summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilad Barkan <giladbarkan@google.com>2022-08-19 00:33:40 +0000
committerGilad Barkan <giladbarkan@google.com>2022-08-25 13:15:08 +0000
commit8d21a842226c48686bf15a9cf9952f51745cf3ae (patch)
tree3db9583b86d069867dfa875488a8bc3027e3b2c1
parentcc036cf381c12f54007888943c4894d17c44b691 (diff)
downloadAdServices-8d21a842226c48686bf15a9cf9952f51745cf3ae.tar.gz
Enforce measurement enrollment.
- URLs passed in to API calls must be on the enrollment list. - Switch source, trigger, report and attribution tables to use enrollment ID in place of ad-tech-domain. - Attribution matching to use enrollment ID in place of ad-tech-domain. - Reporting job to use base-url from the enrollment table and append "well-known" suffixes for each reporting type. Test: atest com.android.adservices.data.DbHelperTest Test: atest com.android.adservices.data.measurement Test: atest com.android.adservices.service.measurement Bug: 238924528 Change-Id: I703559764734cbb34f89cb6eeb8399650f083ff1
-rw-r--r--adservices/service-core/java/com/android/adservices/data/enrollment/PreEnrolledAdTechForTest.java46
-rw-r--r--adservices/service-core/java/com/android/adservices/data/measurement/IMeasurementDao.java22
-rw-r--r--adservices/service-core/java/com/android/adservices/data/measurement/MeasurementDao.java49
-rw-r--r--adservices/service-core/java/com/android/adservices/data/measurement/MeasurementTables.java27
-rw-r--r--adservices/service-core/java/com/android/adservices/data/measurement/SqliteObjectMapper.java8
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/Attribution.java20
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/EventReport.java24
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/MeasurementImpl.java73
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/PrivacyParams.java16
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/Source.java24
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/Trigger.java22
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/aggregation/AggregateReport.java20
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/attribution/AttributionJobHandler.java36
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceFetcher.java28
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceRegistration.java29
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerFetcher.java28
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerRegistration.java29
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateFallbackReportingJobService.java2
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandler.java27
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobService.java2
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventFallbackReportingJobService.java2
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobHandler.java16
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobService.java2
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/util/Enrollment.java62
-rw-r--r--adservices/service-core/java/com/android/adservices/service/measurement/util/Web.java2
-rw-r--r--adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/SourceFixture.java6
-rw-r--r--adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/TriggerFixture.java6
-rw-r--r--adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/AggregateReportFixture.java5
-rw-r--r--adservices/tests/unittest/service-core/assets/aggregate_report_service_test.json62
-rw-r--r--adservices/tests/unittest/service-core/assets/attribution_service_test.json167
-rw-r--r--adservices/tests/unittest/service-core/assets/event_report_service_test.json66
-rw-r--r--adservices/tests/unittest/service-core/assets/measurement_app_uninstall_deletion_test.json33
-rw-r--r--adservices/tests/unittest/service-core/assets/measurement_delete_expired_test.json12
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/registrant_not_found.json16
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain.json26
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain_preserve.json31
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain.json27
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain_preserve.json35
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_nor_range.json12
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain.json36
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_exclude_rate_limit.json40
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_preserve.json46
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_but_no_range.json14
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_and_origin.json22
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_but_no_origin.json13
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_and_origin.json22
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_no_origin.json13
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_and_origin.json22
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_no_origin.json13
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_and_origin.json22
-rw-r--r--adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_no_origin.json13
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/DbHelperTest.java16
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java11
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DbState.java9
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DeleteExpiredDynamicIntegrationTest.java2
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/MeasurementDaoTest.java203
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/AttributionTest.java22
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2EMockTest.java6
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2ETest.java3
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/EventReportTest.java14
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/MeasurementImplTest.java111
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/SourceTest.java64
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TestObjectProvider.java2
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TriggerTest.java43
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/aggregation/AggregateReportTest.java4
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/AttributionJobHandlerTest.java10
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ResponseBasedFetcherTest.java1
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceFetcherTest.java100
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceRegistrationTest.java18
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerFetcherTest.java53
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerRegistrationTest.java10
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerIntegrationTest.java13
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerTest.java66
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerWrapper.java11
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerIntegrationTest.java13
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerTest.java36
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerWrapper.java9
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/EnrollmentTest.java96
78 files changed, 946 insertions, 1396 deletions
diff --git a/adservices/service-core/java/com/android/adservices/data/enrollment/PreEnrolledAdTechForTest.java b/adservices/service-core/java/com/android/adservices/data/enrollment/PreEnrolledAdTechForTest.java
index af0b612d7a..52cbde6d29 100644
--- a/adservices/service-core/java/com/android/adservices/data/enrollment/PreEnrolledAdTechForTest.java
+++ b/adservices/service-core/java/com/android/adservices/data/enrollment/PreEnrolledAdTechForTest.java
@@ -29,7 +29,10 @@ final class PreEnrolledAdTechForTest {
SIMPLE_ENROLLMENT,
ONE_SDK_MULTIPLE_URLS,
SECOND_ENROLLMENT,
- TOPICS_SAMPLE_APPS
+ TOPICS_SAMPLE_APPS,
+ AD_TECH_1,
+ AD_TECH_2,
+ AD_TECH_3
);
}
@@ -93,4 +96,45 @@ final class PreEnrolledAdTechForTest {
.setEncryptionKeyUrl(Arrays.asList("https://test.com/keys"))
.build();
+ // (Measurement E2E tests)
+ private static final EnrollmentData AD_TECH_1 =
+ new EnrollmentData.Builder()
+ .setEnrollmentId("E5")
+ .setCompanyId("ad-tech-1")
+ .setSdkNames("sdk")
+ .setAttributionSourceRegistrationUrl(Arrays.asList("https://www.ad-tech1.com"))
+ .setAttributionTriggerRegistrationUrl(Arrays.asList("https://www.ad-tech1.com"))
+ .setAttributionReportingUrl(Arrays.asList("https://www.ad-tech1.com"))
+ .setRemarketingResponseBasedRegistrationUrl(
+ Arrays.asList("https://www.ad-tech1.com"))
+ .setEncryptionKeyUrl(Arrays.asList("https://www.ad-tech1.com/keys"))
+ .build();
+
+ // (Measurement E2E tests)
+ private static final EnrollmentData AD_TECH_2 =
+ new EnrollmentData.Builder()
+ .setEnrollmentId("E6")
+ .setCompanyId("ad-tech-2")
+ .setSdkNames("sdk")
+ .setAttributionSourceRegistrationUrl(Arrays.asList("https://www.ad-tech2.com"))
+ .setAttributionTriggerRegistrationUrl(Arrays.asList("https://www.ad-tech2.com"))
+ .setAttributionReportingUrl(Arrays.asList("https://www.ad-tech2.com"))
+ .setRemarketingResponseBasedRegistrationUrl(
+ Arrays.asList("https://www.ad-tech2.com"))
+ .setEncryptionKeyUrl(Arrays.asList("https://www.ad-tech2.com/keys"))
+ .build();
+
+ // (Measurement E2E tests)
+ private static final EnrollmentData AD_TECH_3 =
+ new EnrollmentData.Builder()
+ .setEnrollmentId("E7")
+ .setCompanyId("ad-tech-3")
+ .setSdkNames("sdk")
+ .setAttributionSourceRegistrationUrl(Arrays.asList("https://www.ad-tech3.com"))
+ .setAttributionTriggerRegistrationUrl(Arrays.asList("https://www.ad-tech3.com"))
+ .setAttributionReportingUrl(Arrays.asList("https://www.ad-tech3.com"))
+ .setRemarketingResponseBasedRegistrationUrl(
+ Arrays.asList("https://www.ad-tech3.com"))
+ .setEncryptionKeyUrl(Arrays.asList("https://www.ad-tech3.com/keys"))
+ .build();
}
diff --git a/adservices/service-core/java/com/android/adservices/data/measurement/IMeasurementDao.java b/adservices/service-core/java/com/android/adservices/data/measurement/IMeasurementDao.java
index fd1bcac6f6..36a60adaf4 100644
--- a/adservices/service-core/java/com/android/adservices/data/measurement/IMeasurementDao.java
+++ b/adservices/service-core/java/com/android/adservices/data/measurement/IMeasurementDao.java
@@ -69,28 +69,28 @@ public interface IMeasurementDao {
long getNumTriggersPerRegistrant(Uri registrant) throws DatastoreException;
/**
- * Gets the count of distinct Uri's of ad-techs in the Attribution table in a time window with
- * matching publisher and destination, excluding a given ad-tech.
+ * Gets the count of distinct IDs of enrollments in the Attribution table in a time window
+ * with matching publisher and destination, excluding a given enrollment ID.
*/
- Integer countDistinctAdTechsPerPublisherXDestinationInAttribution(Uri sourceSite,
- Uri destination, Uri excludedAdTech, long windowStartTime, long windowEndTime)
+ Integer countDistinctEnrollmentsPerPublisherXDestinationInAttribution(Uri sourceSite,
+ Uri destination, String excludedEnrollmentId, long windowStartTime, long windowEndTime)
throws DatastoreException;
/**
* Gets the count of distinct Uri's of destinations in the Source table in a time window with
- * matching publisher and ACTIVE status, excluding a given destination.
+ * matching publisher, enrollment, and ACTIVE status, excluding a given destination.
*/
- Integer countDistinctDestinationsPerPublisherXAdTechInActiveSource(Uri publisher,
- @EventSurfaceType int publisherType, Uri adTechDomain, Uri excludedDestination,
+ Integer countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(Uri publisher,
+ @EventSurfaceType int publisherType, String enrollmentId, Uri excludedDestination,
@EventSurfaceType int destinationType, long windowStartTime, long windowEndTime)
throws DatastoreException;
/**
- * Gets the count of distinct Uri's of ad-techs in the Source table in a time window with
- * matching publisher and destination, excluding a given ad-tech.
+ * Gets the count of distinct IDs of enrollments in the Source table in a time window with
+ * matching publisher and destination, excluding a given enrollment ID.
*/
- Integer countDistinctAdTechsPerPublisherXDestinationInSource(Uri publisher,
- @EventSurfaceType int publisherType, Uri destination, Uri excludedAdTech,
+ Integer countDistinctEnrollmentsPerPublisherXDestinationInSource(Uri publisher,
+ @EventSurfaceType int publisherType, Uri destination, String enrollmentId,
long windowStartTime, long windowEndTime) throws DatastoreException;
/**
diff --git a/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementDao.java b/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementDao.java
index 15785b1d93..59a598bf7b 100644
--- a/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementDao.java
+++ b/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementDao.java
@@ -81,8 +81,6 @@ class MeasurementDao implements IMeasurementDao {
values.put(MeasurementTables.TriggerContract.EVENT_TRIGGERS,
trigger.getEventTriggers());
values.put(MeasurementTables.TriggerContract.STATUS, Trigger.Status.PENDING);
- values.put(MeasurementTables.TriggerContract.AD_TECH_DOMAIN,
- trigger.getAdTechDomain().toString());
values.put(MeasurementTables.TriggerContract.ENROLLMENT_ID, trigger.getEnrollmentId());
values.put(MeasurementTables.TriggerContract.REGISTRANT,
trigger.getRegistrant().toString());
@@ -188,8 +186,6 @@ class MeasurementDao implements IMeasurementDao {
values.put(
MeasurementTables.SourceContract.WEB_DESTINATION,
getNullableUriString(source.getWebDestination()));
- values.put(MeasurementTables.SourceContract.AD_TECH_DOMAIN,
- source.getAdTechDomain().toString());
values.put(MeasurementTables.SourceContract.ENROLLMENT_ID, source.getEnrollmentId());
values.put(MeasurementTables.SourceContract.EVENT_TIME, source.getEventTime());
values.put(MeasurementTables.SourceContract.EXPIRY_TIME, source.getExpiryTime());
@@ -237,7 +233,7 @@ class MeasurementDao implements IMeasurementDao {
/*columns=*/ null,
sourceDestinationColumn
+ " = ? AND "
- + MeasurementTables.SourceContract.AD_TECH_DOMAIN
+ + MeasurementTables.SourceContract.ENROLLMENT_ID
+ " = ? AND "
// EventTime should be strictly less than TriggerTime as it
// is highly
@@ -252,7 +248,7 @@ class MeasurementDao implements IMeasurementDao {
+ " != ?",
new String[] {
triggerDestinationValue,
- trigger.getAdTechDomain().toString(),
+ trigger.getEnrollmentId(),
String.valueOf(trigger.getTriggerTime()),
String.valueOf(trigger.getTriggerTime()),
String.valueOf(Source.Status.IGNORED)
@@ -427,8 +423,6 @@ class MeasurementDao implements IMeasurementDao {
eventReport.getTriggerData());
values.put(MeasurementTables.EventReportContract.TRIGGER_DEDUP_KEY,
eventReport.getTriggerDedupKey());
- values.put(MeasurementTables.EventReportContract.AD_TECH_DOMAIN,
- eventReport.getAdTechDomain().toString());
values.put(MeasurementTables.EventReportContract.ENROLLMENT_ID,
eventReport.getEnrollmentId());
values.put(MeasurementTables.EventReportContract.STATUS,
@@ -478,9 +472,6 @@ class MeasurementDao implements IMeasurementDao {
MeasurementTables.AttributionContract.DESTINATION_ORIGIN,
attribution.getDestinationOrigin());
values.put(
- MeasurementTables.AttributionContract.AD_TECH_DOMAIN,
- attribution.getAdTechDomain());
- values.put(
MeasurementTables.AttributionContract.ENROLLMENT_ID,
attribution.getEnrollmentId());
values.put(
@@ -523,7 +514,7 @@ class MeasurementDao implements IMeasurementDao {
MeasurementTables.AttributionContract.SOURCE_SITE + " = ? AND "
+ MeasurementTables.AttributionContract.DESTINATION_SITE
+ " = ? AND "
- + MeasurementTables.AttributionContract.AD_TECH_DOMAIN
+ + MeasurementTables.AttributionContract.ENROLLMENT_ID
+ " = ? AND "
+ MeasurementTables.AttributionContract.TRIGGER_TIME
+ " >= ? AND "
@@ -532,7 +523,7 @@ class MeasurementDao implements IMeasurementDao {
new String[] {
publisherTopPrivateDomain,
triggerDestinationTopPrivateDomain,
- trigger.getAdTechDomain().toString(),
+ trigger.getEnrollmentId(),
String.valueOf(trigger.getTriggerTime()
- PrivacyParams.RATE_LIMIT_WINDOW_MILLISECONDS),
String.valueOf(trigger.getTriggerTime())
@@ -558,14 +549,14 @@ class MeasurementDao implements IMeasurementDao {
}
@Override
- public Integer countDistinctAdTechsPerPublisherXDestinationInAttribution(Uri sourceSite,
- Uri destinationSite, Uri excludedAdTech, long windowStartTime, long windowEndTime)
- throws DatastoreException {
+ public Integer countDistinctEnrollmentsPerPublisherXDestinationInAttribution(Uri sourceSite,
+ Uri destinationSite, String excludedEnrollmentId, long windowStartTime,
+ long windowEndTime) throws DatastoreException {
String query = String.format(
"SELECT COUNT(DISTINCT %1$s) FROM %2$s "
+ "WHERE %3$s = ? AND %4$s = ? AND %1s != ? "
+ "AND %5$s < ? AND %5$s >= ?",
- MeasurementTables.AttributionContract.AD_TECH_DOMAIN,
+ MeasurementTables.AttributionContract.ENROLLMENT_ID,
MeasurementTables.AttributionContract.TABLE,
MeasurementTables.AttributionContract.SOURCE_SITE,
MeasurementTables.AttributionContract.DESTINATION_SITE,
@@ -576,14 +567,14 @@ class MeasurementDao implements IMeasurementDao {
new String[] {
sourceSite.toString(),
destinationSite.toString(),
- excludedAdTech.toString(),
+ excludedEnrollmentId,
String.valueOf(windowEndTime),
String.valueOf(windowStartTime) }));
}
@Override
- public Integer countDistinctDestinationsPerPublisherXAdTechInActiveSource(Uri publisher,
- @EventSurfaceType int publisherType, Uri adTechDomain, Uri excludedDestination,
+ public Integer countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(Uri publisher,
+ @EventSurfaceType int publisherType, String enrollmentId, Uri excludedDestination,
@EventSurfaceType int destinationType, long windowStartTime, long windowEndTime)
throws DatastoreException {
String destinationColumn = destinationType == EventSurfaceType.APP
@@ -596,14 +587,14 @@ class MeasurementDao implements IMeasurementDao {
destinationColumn,
MeasurementTables.SourceContract.TABLE,
getPublisherWhereStatement(publisher, publisherType),
- MeasurementTables.SourceContract.AD_TECH_DOMAIN,
+ MeasurementTables.SourceContract.ENROLLMENT_ID,
MeasurementTables.SourceContract.STATUS,
MeasurementTables.SourceContract.EVENT_TIME);
return (int) DatabaseUtils.longForQuery(
mSQLTransaction.getDatabase(),
query,
new String[] {
- adTechDomain.toString(),
+ enrollmentId,
String.valueOf(Source.Status.ACTIVE),
excludedDestination.toString(),
String.valueOf(windowEndTime),
@@ -611,14 +602,14 @@ class MeasurementDao implements IMeasurementDao {
}
@Override
- public Integer countDistinctAdTechsPerPublisherXDestinationInSource(Uri publisher,
- @EventSurfaceType int publisherType, Uri destination, Uri excludedAdTech,
+ public Integer countDistinctEnrollmentsPerPublisherXDestinationInSource(Uri publisher,
+ @EventSurfaceType int publisherType, Uri destination, String excludedEnrollmentId,
long windowStartTime, long windowEndTime) throws DatastoreException {
String query = String.format(
"SELECT COUNT(DISTINCT %1$s) FROM %2$s "
+ "WHERE %3$s AND (%4$s = ? OR %5$s = ?) AND %1s != ? "
+ "AND %6$s < ? AND %6$s >= ?",
- MeasurementTables.SourceContract.AD_TECH_DOMAIN,
+ MeasurementTables.SourceContract.ENROLLMENT_ID,
MeasurementTables.SourceContract.TABLE,
getPublisherWhereStatement(publisher, publisherType),
MeasurementTables.SourceContract.APP_DESTINATION,
@@ -630,7 +621,7 @@ class MeasurementDao implements IMeasurementDao {
new String[] {
destination.toString(),
destination.toString(),
- excludedAdTech.toString(),
+ excludedEnrollmentId,
String.valueOf(windowEndTime),
String.valueOf(windowStartTime) }));
}
@@ -658,8 +649,8 @@ class MeasurementDao implements IMeasurementDao {
MeasurementTables.SourceContract.EVENT_ID,
MeasurementTables.EventReportContract.ATTRIBUTION_DESTINATION,
MeasurementTables.SourceContract.APP_DESTINATION,
- MeasurementTables.EventReportContract.AD_TECH_DOMAIN,
- MeasurementTables.SourceContract.AD_TECH_DOMAIN,
+ MeasurementTables.EventReportContract.ENROLLMENT_ID,
+ MeasurementTables.SourceContract.ENROLLMENT_ID,
MeasurementTables.SourceContract.REGISTRANT),
new String[] {uriStr});
// EventReport table
@@ -1133,8 +1124,6 @@ class MeasurementDao implements IMeasurementDao {
aggregateReport.getSourceRegistrationTime());
values.put(MeasurementTables.AggregateReport.SCHEDULED_REPORT_TIME,
aggregateReport.getScheduledReportTime());
- values.put(MeasurementTables.AggregateReport.AD_TECH_DOMAIN,
- aggregateReport.getAdTechDomain().toString());
values.put(MeasurementTables.AggregateReport.ENROLLMENT_ID,
aggregateReport.getEnrollmentId());
values.put(MeasurementTables.AggregateReport.DEBUG_CLEARTEXT_PAYLOAD,
diff --git a/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementTables.java b/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementTables.java
index dd6581fe93..6a7931a776 100644
--- a/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementTables.java
+++ b/adservices/service-core/java/com/android/adservices/data/measurement/MeasurementTables.java
@@ -76,7 +76,6 @@ public final class MeasurementTables {
String PRIORITY = "priority";
String STATUS = "status";
String SOURCE_TYPE = "source_type";
- String AD_TECH_DOMAIN = "ad_tech_domain";
String ENROLLMENT_ID = "enrollment_id";
String REGISTRANT = "registrant";
String ATTRIBUTION_MODE = "attribution_mode";
@@ -98,7 +97,6 @@ public final class MeasurementTables {
String TRIGGER_TIME = "trigger_time";
String STATUS = "status";
String REGISTRANT = "registrant";
- String AD_TECH_DOMAIN = "ad_tech_domain";
String ENROLLMENT_ID = "enrollment_id";
String EVENT_TRIGGERS = "event_triggers";
String AGGREGATE_TRIGGER_DATA = "aggregate_trigger_data";
@@ -120,7 +118,6 @@ public final class MeasurementTables {
String TRIGGER_TIME = "trigger_time";
String STATUS = "status";
String SOURCE_TYPE = "source_type";
- String AD_TECH_DOMAIN = "ad_tech_domain";
String ENROLLMENT_ID = "enrollment_id";
String RANDOMIZED_TRIGGER_RATE = "randomized_trigger_rate";
}
@@ -135,7 +132,6 @@ public final class MeasurementTables {
String DESTINATION_ORIGIN = "destination_origin";
String TRIGGER_TIME = "trigger_time";
String REGISTRANT = "registrant";
- String AD_TECH_DOMAIN = "ad_tech_domain";
String ENROLLMENT_ID = "enrollment_id";
}
@@ -147,7 +143,6 @@ public final class MeasurementTables {
String ATTRIBUTION_DESTINATION = "attribution_destination";
String SOURCE_REGISTRATION_TIME = "source_registration_time";
String SCHEDULED_REPORT_TIME = "scheduled_report_time";
- String AD_TECH_DOMAIN = "ad_tech_domain";
String ENROLLMENT_ID = "enrollment_id";
String DEBUG_CLEARTEXT_PAYLOAD = "debug_cleartext_payload";
String STATUS = "status";
@@ -209,8 +204,6 @@ public final class MeasurementTables {
+ " INTEGER, "
+ SourceContract.APP_DESTINATION
+ " TEXT, "
- + SourceContract.AD_TECH_DOMAIN
- + " TEXT, "
+ SourceContract.ENROLLMENT_ID
+ " TEXT, "
+ SourceContract.EVENT_TIME
@@ -257,8 +250,6 @@ public final class MeasurementTables {
+ " TEXT, "
+ TriggerContract.DESTINATION_TYPE
+ " INTEGER, "
- + TriggerContract.AD_TECH_DOMAIN
- + " TEXT, "
+ TriggerContract.ENROLLMENT_ID
+ " TEXT, "
+ TriggerContract.TRIGGER_TIME
@@ -287,8 +278,6 @@ public final class MeasurementTables {
+ " TEXT PRIMARY KEY NOT NULL, "
+ EventReportContract.SOURCE_ID
+ " INTEGER, "
- + EventReportContract.AD_TECH_DOMAIN
- + " TEXT, "
+ EventReportContract.ENROLLMENT_ID
+ " TEXT, "
+ EventReportContract.ATTRIBUTION_DESTINATION
@@ -325,8 +314,6 @@ public final class MeasurementTables {
+ " TEXT, "
+ AttributionContract.DESTINATION_ORIGIN
+ " TEXT, "
- + AttributionContract.AD_TECH_DOMAIN
- + " TEXT, "
+ AttributionContract.ENROLLMENT_ID
+ " TEXT, "
+ AttributionContract.TRIGGER_TIME
@@ -349,8 +336,6 @@ public final class MeasurementTables {
+ " INTEGER, "
+ AggregateReport.SCHEDULED_REPORT_TIME
+ " INTEGER, "
- + AggregateReport.AD_TECH_DOMAIN
- + " TEXT, "
+ AggregateReport.ENROLLMENT_ID
+ " TEXT, "
+ AggregateReport.DEBUG_CLEARTEXT_PAYLOAD
@@ -375,14 +360,12 @@ public final class MeasurementTables {
"CREATE INDEX "
+ INDEX_PREFIX
+ SourceContract.TABLE
- + "_ad_atd_ei_et "
+ + "_ad_ei_et "
+ "ON "
+ SourceContract.TABLE
+ "( "
+ SourceContract.APP_DESTINATION
+ ", "
- + SourceContract.AD_TECH_DOMAIN
- + ", "
+ SourceContract.ENROLLMENT_ID
+ ", "
+ SourceContract.EXPIRY_TIME
@@ -417,14 +400,12 @@ public final class MeasurementTables {
"CREATE INDEX "
+ INDEX_PREFIX
+ TriggerContract.TABLE
- + "_ad_atd_ei_tt "
+ + "_ad_ei_tt "
+ "ON "
+ TriggerContract.TABLE
+ "( "
+ TriggerContract.ATTRIBUTION_DESTINATION
+ ", "
- + TriggerContract.AD_TECH_DOMAIN
- + ", "
+ TriggerContract.ENROLLMENT_ID
+ ", "
+ TriggerContract.TRIGGER_TIME
@@ -441,7 +422,7 @@ public final class MeasurementTables {
"CREATE INDEX "
+ INDEX_PREFIX
+ AttributionContract.TABLE
- + "_ss_so_ds_do_atd_ei_tt"
+ + "_ss_so_ds_do_ei_tt"
+ " ON "
+ AttributionContract.TABLE
+ "("
@@ -453,8 +434,6 @@ public final class MeasurementTables {
+ ", "
+ AttributionContract.DESTINATION_ORIGIN
+ ", "
- + AttributionContract.AD_TECH_DOMAIN
- + ", "
+ AttributionContract.ENROLLMENT_ID
+ ", "
+ AttributionContract.TRIGGER_TIME
diff --git a/adservices/service-core/java/com/android/adservices/data/measurement/SqliteObjectMapper.java b/adservices/service-core/java/com/android/adservices/data/measurement/SqliteObjectMapper.java
index e46090e118..fcae296962 100644
--- a/adservices/service-core/java/com/android/adservices/data/measurement/SqliteObjectMapper.java
+++ b/adservices/service-core/java/com/android/adservices/data/measurement/SqliteObjectMapper.java
@@ -53,8 +53,6 @@ public class SqliteObjectMapper {
builder::setTriggerDedupKey);
setUriColumn(cursor, MeasurementTables.EventReportContract.ATTRIBUTION_DESTINATION,
builder::setAttributionDestination);
- setUriColumn(cursor, MeasurementTables.EventReportContract.AD_TECH_DOMAIN,
- builder::setAdTechDomain);
setTextColumn(cursor, MeasurementTables.EventReportContract.ENROLLMENT_ID,
builder::setEnrollmentId);
setLongColumn(cursor, MeasurementTables.EventReportContract.REPORT_TIME,
@@ -79,8 +77,6 @@ public class SqliteObjectMapper {
builder::setEventId);
setLongColumn(cursor, MeasurementTables.SourceContract.PRIORITY,
builder::setPriority);
- setUriColumn(cursor, MeasurementTables.SourceContract.AD_TECH_DOMAIN,
- builder::setAdTechDomain);
setTextColumn(cursor, MeasurementTables.SourceContract.ENROLLMENT_ID,
builder::setEnrollmentId);
setUriColumn(cursor, MeasurementTables.SourceContract.PUBLISHER,
@@ -141,8 +137,6 @@ public class SqliteObjectMapper {
builder::setAttributionDestination);
setIntColumn(cursor, MeasurementTables.TriggerContract.DESTINATION_TYPE,
builder::setDestinationType);
- setUriColumn(cursor, MeasurementTables.TriggerContract.AD_TECH_DOMAIN,
- builder::setAdTechDomain);
setTextColumn(cursor, MeasurementTables.TriggerContract.ENROLLMENT_ID,
builder::setEnrollmentId);
setIntColumn(cursor, MeasurementTables.TriggerContract.STATUS,
@@ -174,8 +168,6 @@ public class SqliteObjectMapper {
builder::setSourceRegistrationTime);
setLongColumn(cursor, MeasurementTables.AggregateReport.SCHEDULED_REPORT_TIME,
builder::setScheduledReportTime);
- setUriColumn(cursor, MeasurementTables.AggregateReport.AD_TECH_DOMAIN,
- builder::setAdTechDomain);
setTextColumn(cursor, MeasurementTables.AggregateReport.ENROLLMENT_ID,
builder::setEnrollmentId);
setTextColumn(cursor, MeasurementTables.AggregateReport.DEBUG_CLEARTEXT_PAYLOAD,
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/Attribution.java b/adservices/service-core/java/com/android/adservices/service/measurement/Attribution.java
index 117e3de35c..813101a7d1 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/Attribution.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/Attribution.java
@@ -31,7 +31,6 @@ public class Attribution {
private final String mSourceOrigin;
private final String mDestinationSite;
private final String mDestinationOrigin;
- private final String mAdTechDomain;
private final String mEnrollmentId;
private final long mTriggerTime;
private final String mRegistrant;
@@ -42,7 +41,6 @@ public class Attribution {
this.mSourceOrigin = builder.mSourceOrigin;
this.mDestinationSite = builder.mDestinationSite;
this.mDestinationOrigin = builder.mDestinationOrigin;
- this.mAdTechDomain = builder.mAdTechDomain;
this.mEnrollmentId = builder.mEnrollmentId;
this.mTriggerTime = builder.mTriggerTime;
this.mRegistrant = builder.mRegistrant;
@@ -59,7 +57,6 @@ public class Attribution {
&& Objects.equals(mSourceOrigin, attr.mSourceOrigin)
&& Objects.equals(mDestinationSite, attr.mDestinationSite)
&& Objects.equals(mDestinationOrigin, attr.mDestinationOrigin)
- && Objects.equals(mAdTechDomain, attr.mAdTechDomain)
&& Objects.equals(mEnrollmentId, attr.mEnrollmentId)
&& Objects.equals(mRegistrant, attr.mRegistrant);
}
@@ -71,7 +68,6 @@ public class Attribution {
mSourceOrigin,
mDestinationSite,
mDestinationOrigin,
- mAdTechDomain,
mEnrollmentId,
mTriggerTime,
mRegistrant);
@@ -102,11 +98,6 @@ public class Attribution {
return mDestinationOrigin;
}
- /** @return {@link Source} or {@link Trigger} ad-tech domain */
- public String getAdTechDomain() {
- return mAdTechDomain;
- }
-
/** @return {@link Source} or {@link Trigger} enrollment ID */
public String getEnrollmentId() {
return mEnrollmentId;
@@ -129,7 +120,6 @@ public class Attribution {
private String mSourceOrigin;
private String mDestinationSite;
private String mDestinationOrigin;
- private String mAdTechDomain;
private String mEnrollmentId;
private long mTriggerTime;
private String mRegistrant;
@@ -164,12 +154,6 @@ public class Attribution {
return this;
}
- /** See {@link Attribution#getAdTechDomain()}. */
- public Builder setAdTechDomain(String adTechDomain) {
- mAdTechDomain = adTechDomain;
- return this;
- }
-
/** See {@link Attribution#getEnrollmentId()}. */
public Builder setEnrollmentId(String enrollmentId) {
mEnrollmentId = enrollmentId;
@@ -195,9 +179,7 @@ public class Attribution {
mSourceOrigin,
mDestinationSite,
mDestinationOrigin,
- mAdTechDomain,
- // TODO (b/238924528): uncomment when enforcing enrollment
- //mEnrollmentId,
+ mEnrollmentId,
mRegistrant);
return new Attribution(this);
}
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/EventReport.java b/adservices/service-core/java/com/android/adservices/service/measurement/EventReport.java
index 12e243bf81..bb80988ac5 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/EventReport.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/EventReport.java
@@ -34,7 +34,6 @@ public class EventReport {
private long mTriggerTime;
private long mTriggerPriority;
private Uri mAttributionDestination;
- private Uri mAdTechDomain;
private String mEnrollmentId;
private long mTriggerData;
private Long mTriggerDedupKey;
@@ -65,7 +64,6 @@ public class EventReport {
return mStatus == eventReport.mStatus
&& mReportTime == eventReport.mReportTime
&& Objects.equals(mAttributionDestination, eventReport.mAttributionDestination)
- && Objects.equals(mAdTechDomain, eventReport.mAdTechDomain)
&& Objects.equals(mEnrollmentId, eventReport.mEnrollmentId)
&& mTriggerTime == eventReport.mTriggerTime
&& mTriggerData == eventReport.mTriggerData
@@ -78,9 +76,9 @@ public class EventReport {
@Override
public int hashCode() {
- return Objects.hash(mStatus, mReportTime, mAttributionDestination, mAdTechDomain,
- mEnrollmentId, mTriggerTime, mTriggerData, mSourceId, mTriggerPriority,
- mTriggerDedupKey, mSourceType, mRandomizedTriggerRate);
+ return Objects.hash(mStatus, mReportTime, mAttributionDestination, mEnrollmentId,
+ mTriggerTime, mTriggerData, mSourceId, mTriggerPriority, mTriggerDedupKey,
+ mSourceType, mRandomizedTriggerRate);
}
/**
@@ -126,13 +124,6 @@ public class EventReport {
}
/**
- * Ad Tech base endpoint for reports.
- */
- public Uri getAdTechDomain() {
- return mAdTechDomain;
- }
-
- /**
* Ad Tech enrollment ID.
*/
public String getEnrollmentId() {
@@ -202,14 +193,6 @@ public class EventReport {
}
/**
- * See {@link EventReport#getAdTechDomain()} ()}
- */
- public Builder setAdTechDomain(Uri adTechDomain) {
- mBuilding.mAdTechDomain = adTechDomain;
- return this;
- }
-
- /**
* See {@link EventReport#getEnrollmentId()} ()}
*/
public Builder setEnrollmentId(String enrollmentId) {
@@ -298,7 +281,6 @@ public class EventReport {
mBuilding.mTriggerData = getTruncatedTriggerData(source, eventTrigger);
mBuilding.mTriggerTime = trigger.getTriggerTime();
mBuilding.mSourceId = source.getEventId();
- mBuilding.mAdTechDomain = source.getAdTechDomain();
mBuilding.mEnrollmentId = source.getEnrollmentId();
mBuilding.mStatus = Status.PENDING;
mBuilding.mAttributionDestination = trigger.getAttributionDestination();
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/MeasurementImpl.java b/adservices/service-core/java/com/android/adservices/service/measurement/MeasurementImpl.java
index 3fd609bd72..0faa17d39c 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/MeasurementImpl.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/MeasurementImpl.java
@@ -94,8 +94,8 @@ public final class MeasurementImpl {
mContext = context;
mContentResolver = context.getContentResolver();
mDatastoreManager = DatastoreManagerFactory.getDatastoreManager(context);
- mSourceFetcher = new SourceFetcher();
- mTriggerFetcher = new TriggerFetcher();
+ mSourceFetcher = new SourceFetcher(context);
+ mTriggerFetcher = new TriggerFetcher(context);
mClickVerifier = new ClickVerifier(context);
mFlags = FlagsFactory.getFlags();
}
@@ -371,13 +371,13 @@ public final class MeasurementImpl {
if (!isDestinationWithinPrivacyBounds(
publisher.get(),
publisherType,
- registration.getRegistrationUri(),
+ registration.getEnrollmentId(),
sourceEventTime,
appDestination,
webDestination)) {
LogUtil.d("insertSources: destination exceeds privacy bound. %s %s %s %s",
appDestination, webDestination, publisher.get(),
- registration.getRegistrationUri());
+ registration.getEnrollmentId());
continue;
}
if (!isAdTechWithinPrivacyBounds(
@@ -386,9 +386,9 @@ public final class MeasurementImpl {
sourceEventTime,
appDestination,
webDestination,
- registration.getRegistrationUri())) {
+ registration.getEnrollmentId())) {
LogUtil.d("insertSources: ad-tech exceeds privacy bound. %s %s %s %s",
- registration.getRegistrationUri(), publisher.get(), appDestination,
+ registration.getEnrollmentId(), publisher.get(), appDestination,
webDestination);
continue;
}
@@ -396,6 +396,7 @@ public final class MeasurementImpl {
createSource(
sourceEventTime,
registration,
+ registration.getEnrollmentId(),
topOriginUri,
publisherType,
registrant,
@@ -409,6 +410,7 @@ public final class MeasurementImpl {
private Source createSource(
long sourceEventTime,
SourceRegistration registration,
+ String enrollmentId,
Uri topOriginUri,
@EventSurfaceType int publisherType,
Uri registrant,
@@ -421,7 +423,7 @@ public final class MeasurementImpl {
.setPublisherType(publisherType)
.setAppDestination(destination)
.setWebDestination(webDestination)
- .setAdTechDomain(getBaseUri(registration.getRegistrationUri()))
+ .setEnrollmentId(enrollmentId)
.setRegistrant(registrant)
.setSourceType(sourceType)
.setPriority(registration.getSourcePriority())
@@ -484,7 +486,7 @@ public final class MeasurementImpl {
.setReportTime(fakeReport.getReportingTime())
.setTriggerData(fakeReport.getTriggerData())
.setAttributionDestination(fakeReport.getDestination())
- .setAdTechDomain(source.getAdTechDomain())
+ .setEnrollmentId(source.getEnrollmentId())
// The query for attribution check is from
// (triggerTime - 30 days) to triggerTime and max expiry is
// 30 days, so it's safe to choose triggerTime as source
@@ -522,7 +524,12 @@ public final class MeasurementImpl {
@EventSurfaceType int destinationType) {
for (TriggerRegistration registration : responseBasedRegistrations) {
Trigger trigger = createTrigger(
- registration, triggerTime, topOrigin, registrant, destinationType);
+ registration,
+ registration.getEnrollmentId(),
+ triggerTime,
+ topOrigin,
+ registrant,
+ destinationType);
mDatastoreManager.runInTransaction((dao) -> dao.insertTrigger(trigger));
}
notifyTriggerContentProvider();
@@ -541,6 +548,7 @@ public final class MeasurementImpl {
private Trigger createTrigger(
TriggerRegistration registration,
+ String enrollmentId,
long triggerTime,
Uri topOrigin,
Uri registrant,
@@ -548,7 +556,7 @@ public final class MeasurementImpl {
return new Trigger.Builder()
.setAttributionDestination(topOrigin)
.setDestinationType(destinationType)
- .setAdTechDomain(getBaseUri(registration.getRegistrationUri()))
+ .setEnrollmentId(enrollmentId)
.setRegistrant(registrant)
.setTriggerTime(triggerTime)
.setEventTriggers(registration.getEventTriggers())
@@ -661,7 +669,7 @@ public final class MeasurementImpl {
.setSourceOrigin(BaseUriExtractor.getBaseUri(source.getPublisher()).toString())
.setDestinationSite(triggerDestinationTopPrivateDomain)
.setDestinationOrigin(BaseUriExtractor.getBaseUri(destination).toString())
- .setAdTechDomain(source.getAdTechDomain().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setTriggerTime(source.getEventTime())
.setRegistrant(source.getRegistrant().toString())
.build();
@@ -694,7 +702,7 @@ public final class MeasurementImpl {
private boolean isDestinationWithinPrivacyBounds(
Uri publisher,
@EventSurfaceType int publisherType,
- Uri registrationUri,
+ String enrollmentId,
long requestTime,
@Nullable Uri appDestination,
@Nullable Uri webDestination) {
@@ -702,7 +710,7 @@ public final class MeasurementImpl {
if (appDestination != null && !isDestinationWithinPrivacyBounds(
publisher,
publisherType,
- registrationUri,
+ enrollmentId,
appDestination,
EventSurfaceType.APP,
windowStartTime,
@@ -712,7 +720,7 @@ public final class MeasurementImpl {
if (webDestination != null && !isDestinationWithinPrivacyBounds(
publisher,
publisherType,
- registrationUri,
+ enrollmentId,
webDestination,
EventSurfaceType.WEB,
windowStartTime,
@@ -725,17 +733,17 @@ public final class MeasurementImpl {
private boolean isDestinationWithinPrivacyBounds(
Uri publisher,
@EventSurfaceType int publisherType,
- Uri registrationUri,
+ String enrollmentId,
Uri destination,
@EventSurfaceType int destinationType,
long windowStartTime,
long requestTime) {
Optional<Integer> destinationCount =
mDatastoreManager.runInTransactionWithResult((dao) ->
- dao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ dao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher,
publisherType,
- registrationUri,
+ enrollmentId,
destination,
destinationType,
windowStartTime,
@@ -743,12 +751,12 @@ public final class MeasurementImpl {
if (destinationCount.isPresent()) {
return destinationCount.get() < PrivacyParams
- .MAX_DISTINCT_DESTINATIONS_PER_PUBLISHER_IN_ACTIVE_SOURCE;
+ .MAX_DISTINCT_DESTINATIONS_PER_PUBLISHER_X_ENROLLMENT_IN_ACTIVE_SOURCE;
} else {
LogUtil.e("isDestinationWithinPrivacyBounds: "
- + "dao.countDistinctDestinationsPerPublisherXAdTechInActiveSource not present."
- + " %s ::: %s ::: %s ::: %s", publisher, destination, windowStartTime,
- requestTime);
+ + "dao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource not "
+ + "present. %s ::: %s ::: %s ::: %s ::: %s", publisher, enrollmentId,
+ destination, windowStartTime, requestTime);
return false;
}
}
@@ -759,14 +767,13 @@ public final class MeasurementImpl {
long requestTime,
@Nullable Uri appDestination,
@Nullable Uri webDestination,
- Uri registrationUri) {
+ String enrollmentId) {
long windowStartTime = requestTime - PrivacyParams.RATE_LIMIT_WINDOW_MILLISECONDS;
if (appDestination != null && !isAdTechWithinPrivacyBounds(
publisher,
publisherType,
appDestination,
- // TODO: will be replaced with enrollment ID
- registrationUri,
+ enrollmentId,
windowStartTime,
requestTime)) {
return false;
@@ -775,8 +782,7 @@ public final class MeasurementImpl {
publisher,
publisherType,
webDestination,
- // TODO: will be replaced with enrollment ID
- registrationUri,
+ enrollmentId,
windowStartTime,
requestTime)) {
return false;
@@ -788,28 +794,27 @@ public final class MeasurementImpl {
Uri publisher,
@EventSurfaceType int publisherType,
Uri destination,
- Uri registrationUri,
+ String enrollmentId,
long windowStartTime,
long requestTime) {
Optional<Integer> adTechCount =
mDatastoreManager.runInTransactionWithResult((dao) ->
- dao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ dao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
publisher,
publisherType,
destination,
- // TODO: will be replaced with enrollment ID
- registrationUri,
+ enrollmentId,
windowStartTime,
requestTime));
if (adTechCount.isPresent()) {
return adTechCount.get() < PrivacyParams
- .MAX_DISTINCT_AD_TECHS_PER_PUBLISHER_X_DESTINATION_IN_SOURCE;
+ .MAX_DISTINCT_ENROLLMENTS_PER_PUBLISHER_X_DESTINATION_IN_SOURCE;
} else {
LogUtil.e("isAdTechWithinPrivacyBounds: "
- + "dao.countDistinctAdTechsPerPublisherXDestinationInSource not present"
- + ". %s ::: %s ::: %s ::: %s ::: $s", publisher, destination,
- registrationUri, windowStartTime, requestTime);
+ + "dao.countDistinctEnrollmentsPerPublisherXDestinationInSource not present"
+ + ". %s ::: %s ::: %s ::: %s ::: $s", publisher, destination, enrollmentId,
+ windowStartTime, requestTime);
return false;
}
}
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/PrivacyParams.java b/adservices/service-core/java/com/android/adservices/service/measurement/PrivacyParams.java
index 74829df15c..5477ed1caa 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/PrivacyParams.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/PrivacyParams.java
@@ -184,19 +184,23 @@ public final class PrivacyParams {
public static final int AGGREGATE_HISTOGRAM_VALUE_BYTE_SIZE = 4;
/**
- * Max distinct ad-techs for attribution per { Advertiser X Publisher X TimePeriod }.
+ * Max distinct enrollments for attribution per { Advertiser X Publisher X TimePeriod }.
*/
- public static final int MAX_DISTINCT_AD_TECHS_PER_PUBLISHER_X_DESTINATION_IN_ATTRIBUTION = 10;
+ public static final int MAX_DISTINCT_ENROLLMENTS_PER_PUBLISHER_X_DESTINATION_IN_ATTRIBUTION =
+ 10;
/**
- * Max distinct advertisers with pending impressions per { Publisher X TimePeriod }.
+ * Max distinct advertisers with pending impressions per
+ * { Publisher X Enrollment X TimePeriod }.
*/
- public static final int MAX_DISTINCT_DESTINATIONS_PER_PUBLISHER_IN_ACTIVE_SOURCE = 100;
+ public static final int MAX_DISTINCT_DESTINATIONS_PER_PUBLISHER_X_ENROLLMENT_IN_ACTIVE_SOURCE =
+ 100;
/**
- * Max distinct ad-techs with source registration per { Publisher X Advertiser X TimePeriod }.
+ * Max distinct enrollments with source registration per
+ * { Publisher X Advertiser X TimePeriod }.
*/
- public static final int MAX_DISTINCT_AD_TECHS_PER_PUBLISHER_X_DESTINATION_IN_SOURCE = 100;
+ public static final int MAX_DISTINCT_ENROLLMENTS_PER_PUBLISHER_X_DESTINATION_IN_SOURCE = 100;
private PrivacyParams() {
}
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/Source.java b/adservices/service-core/java/com/android/adservices/service/measurement/Source.java
index 26a082f22d..42f145e0ef 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/Source.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/Source.java
@@ -71,7 +71,6 @@ public class Source {
@EventSurfaceType private int mPublisherType;
private Uri mAppDestination;
private Uri mWebDestination;
- private Uri mAdTechDomain;
private String mEnrollmentId;
private Uri mRegistrant;
private SourceType mSourceType;
@@ -312,7 +311,6 @@ public class Source {
&& mPublisherType == source.mPublisherType
&& Objects.equals(mAppDestination, source.mAppDestination)
&& Objects.equals(mWebDestination, source.mWebDestination)
- && Objects.equals(mAdTechDomain, source.mAdTechDomain)
&& Objects.equals(mEnrollmentId, source.mEnrollmentId)
&& mPriority == source.mPriority
&& mStatus == source.mStatus
@@ -339,7 +337,6 @@ public class Source {
mPublisherType,
mAppDestination,
mWebDestination,
- mAdTechDomain,
mEnrollmentId,
mPriority,
mStatus,
@@ -444,14 +441,7 @@ public class Source {
}
/**
- * AdTech reporting destination domain for generated reports.
- */
- public Uri getAdTechDomain() {
- return mAdTechDomain;
- }
-
- /**
- * AdTech enrollment ID
+ * Ad Tech enrollment ID
*/
public String getEnrollmentId() {
return mEnrollmentId;
@@ -750,14 +740,6 @@ public class Source {
return this;
}
- /** See {@link Source#getAdTechDomain()} ()}. */
- @NonNull
- public Builder setAdTechDomain(@NonNull Uri adTechDomain) {
- Validation.validateUri(adTechDomain);
- mBuilding.mAdTechDomain = adTechDomain;
- return this;
- }
-
/** See {@link Source#getEnrollmentId()} ()}. */
@NonNull
public Builder setEnrollmentId(@NonNull String enrollmentId) {
@@ -884,9 +866,7 @@ public class Source {
public Source build() {
Validation.validateNonNull(
mBuilding.mPublisher,
- mBuilding.mAdTechDomain,
- // TODO (b/238924528): uncomment when enforcing enrollment.
- //mBuilding.mEnrollmentId,
+ mBuilding.mEnrollmentId,
mBuilding.mRegistrant,
mBuilding.mSourceType);
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/Trigger.java b/adservices/service-core/java/com/android/adservices/service/measurement/Trigger.java
index af1a0d8475..33ade5b89a 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/Trigger.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/Trigger.java
@@ -51,7 +51,6 @@ public class Trigger {
private String mId;
private Uri mAttributionDestination;
@EventSurfaceType private int mDestinationType;
- private Uri mAdTechDomain;
private String mEnrollmentId;
private long mTriggerTime;
private String mEventTriggers;
@@ -90,7 +89,6 @@ public class Trigger {
return Objects.equals(mId, trigger.getId())
&& Objects.equals(mAttributionDestination, trigger.mAttributionDestination)
&& mDestinationType == trigger.mDestinationType
- && Objects.equals(mAdTechDomain, trigger.mAdTechDomain)
&& Objects.equals(mEnrollmentId, trigger.mEnrollmentId)
&& mTriggerTime == trigger.mTriggerTime
&& Objects.equals(mDebugKey, trigger.mDebugKey)
@@ -110,7 +108,6 @@ public class Trigger {
mId,
mAttributionDestination,
mDestinationType,
- mAdTechDomain,
mEnrollmentId,
mTriggerTime,
mEventTriggers,
@@ -143,13 +140,6 @@ public class Trigger {
}
/**
- * AdTech report destination domain for generated reports.
- */
- public Uri getAdTechDomain() {
- return mAdTechDomain;
- }
-
- /**
* AdTech enrollment ID.
*/
public String getEnrollmentId() {
@@ -394,14 +384,6 @@ public class Trigger {
return this;
}
- /** See {@link Trigger#getAdTechDomain()} ()}. */
- @NonNull
- public Builder setAdTechDomain(Uri adTechDomain) {
- Validation.validateUri(adTechDomain);
- mBuilding.mAdTechDomain = adTechDomain;
- return this;
- }
-
/** See {@link Trigger#getEnrollmentId()} ()}. */
@NonNull
public Builder setEnrollmentId(String enrollmentId) {
@@ -479,9 +461,7 @@ public class Trigger {
public Trigger build() {
Validation.validateNonNull(
mBuilding.mAttributionDestination,
- mBuilding.mAdTechDomain,
- // TODO (b/238924528): uncomment when enforcing enrollment
- //mBuilding.mEnrollmentId,
+ mBuilding.mEnrollmentId,
mBuilding.mRegistrant);
return mBuilding;
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/AggregateReport.java b/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/AggregateReport.java
index 16958b3988..5397af9f11 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/AggregateReport.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/AggregateReport.java
@@ -37,7 +37,6 @@ public class AggregateReport {
private Uri mAttributionDestination;
private long mSourceRegistrationTime;
private long mScheduledReportTime; // triggerTime + random([10min, 1hour])
- private Uri mAdTechDomain;
private String mEnrollmentId;
private String mDebugCleartextPayload;
private AggregateAttributionData mAggregateAttributionData;
@@ -60,7 +59,6 @@ public class AggregateReport {
mAttributionDestination = null;
mSourceRegistrationTime = 0L;
mScheduledReportTime = 0L;
- mAdTechDomain = null;
mEnrollmentId = null;
mDebugCleartextPayload = null;
mAggregateAttributionData = null;
@@ -77,7 +75,6 @@ public class AggregateReport {
&& Objects.equals(mAttributionDestination, aggregateReport.mAttributionDestination)
&& mSourceRegistrationTime == aggregateReport.mSourceRegistrationTime
&& mScheduledReportTime == aggregateReport.mScheduledReportTime
- && Objects.equals(mAdTechDomain, aggregateReport.mAdTechDomain)
&& Objects.equals(mEnrollmentId, aggregateReport.mEnrollmentId)
&& Objects.equals(mDebugCleartextPayload, aggregateReport.mDebugCleartextPayload)
&& Objects.equals(mAggregateAttributionData,
@@ -89,7 +86,7 @@ public class AggregateReport {
@Override
public int hashCode() {
return Objects.hash(mId, mPublisher, mAttributionDestination, mSourceRegistrationTime,
- mScheduledReportTime, mAdTechDomain, mEnrollmentId, mDebugCleartextPayload,
+ mScheduledReportTime, mEnrollmentId, mDebugCleartextPayload,
mAggregateAttributionData, mStatus);
}
@@ -129,13 +126,6 @@ public class AggregateReport {
}
/**
- * Uri for report_to of source.
- */
- public Uri getAdTechDomain() {
- return mAdTechDomain;
- }
-
- /**
* Ad-tech enrollment ID.
*/
public String getEnrollmentId() {
@@ -248,14 +238,6 @@ public class AggregateReport {
}
/**
- * See {@link AggregateReport#getAdTechDomain()}.
- */
- public Builder setAdTechDomain(Uri adTechDomain) {
- mAttributionReport.mAdTechDomain = adTechDomain;
- return this;
- }
-
- /**
* See {@link AggregateReport#getEnrollmentId()}.
*/
public Builder setEnrollmentId(String enrollmentId) {
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/attribution/AttributionJobHandler.java b/adservices/service-core/java/com/android/adservices/service/measurement/attribution/AttributionJobHandler.java
index b4d29abcea..b0db04231c 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/attribution/AttributionJobHandler.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/attribution/AttributionJobHandler.java
@@ -121,7 +121,7 @@ class AttributionJobHandler {
}
if (!hasAttributionQuota(source, trigger, measurementDao)
- || !isAdTechWithinPrivacyBounds(source, trigger, measurementDao)) {
+ || !isEnrollmentWithinPrivacyBounds(source, trigger, measurementDao)) {
ignoreTrigger(trigger, measurementDao);
return;
}
@@ -173,7 +173,6 @@ class AttributionJobHandler {
.setSourceRegistrationTime(
roundDownToDay(source.getEventTime()))
.setScheduledReportTime(trigger.getTriggerTime() + randomTime)
- .setAdTechDomain(source.getAdTechDomain())
.setEnrollmentId(source.getEnrollmentId())
.setDebugCleartextPayload(
AggregateReport.generateDebugPayload(
@@ -458,24 +457,24 @@ class AttributionJobHandler {
return Math.floorDiv(timestamp, TimeUnit.DAYS.toMillis(1)) * TimeUnit.DAYS.toMillis(1);
}
- private static boolean isAdTechWithinPrivacyBounds(Source source, Trigger trigger,
+ private static boolean isEnrollmentWithinPrivacyBounds(Source source, Trigger trigger,
IMeasurementDao measurementDao) throws DatastoreException {
Optional<Pair<Uri, Uri>> publisherAndDestination =
getPublisherAndDestinationTopPrivateDomains(source, trigger);
if (publisherAndDestination.isPresent()) {
Integer count =
- measurementDao.countDistinctAdTechsPerPublisherXDestinationInAttribution(
+ measurementDao.countDistinctEnrollmentsPerPublisherXDestinationInAttribution(
publisherAndDestination.get().first,
publisherAndDestination.get().second,
- trigger.getAdTechDomain(), // TODO: will be replaced with enrollment ID
+ trigger.getEnrollmentId(),
trigger.getTriggerTime()
- PrivacyParams.RATE_LIMIT_WINDOW_MILLISECONDS,
trigger.getTriggerTime());
return count < PrivacyParams
- .MAX_DISTINCT_AD_TECHS_PER_PUBLISHER_X_DESTINATION_IN_ATTRIBUTION;
+ .MAX_DISTINCT_ENROLLMENTS_PER_PUBLISHER_X_DESTINATION_IN_ATTRIBUTION;
} else {
- LogUtil.d("isAdTechWithinPrivacyBounds: getPublisherAndDestinationTopPrivateDomains"
+ LogUtil.d("isEnrollmentWithinPrivacyBounds: getPublisherAndDestinationTopPrivateDomains"
+ " failed. %s %s", source.getPublisher(), trigger.getAttributionDestination());
return true;
}
@@ -504,13 +503,14 @@ class AttributionJobHandler {
}
public Attribution createAttribution(@NonNull Source source, @NonNull Trigger trigger) {
- Optional<Uri> publisherBaseUri =
- extractBaseUri(source.getPublisher(), source.getPublisherType());
+ Optional<Uri> publisherTopPrivateDomain =
+ getTopPrivateDomain(source.getPublisher(), source.getPublisherType());
Uri destination = trigger.getAttributionDestination();
- Optional<Uri> destinationBaseUri =
- extractBaseUri(destination, trigger.getDestinationType());
+ Optional<Uri> destinationTopPrivateDomain =
+ getTopPrivateDomain(destination, trigger.getDestinationType());
- if (!publisherBaseUri.isPresent() || !destinationBaseUri.isPresent()) {
+ if (!publisherTopPrivateDomain.isPresent()
+ || !destinationTopPrivateDomain.isPresent()) {
throw new IllegalArgumentException(
String.format(
"insertAttributionRateLimit: "
@@ -519,21 +519,19 @@ class AttributionJobHandler {
source.getPublisher(), destination));
}
- String publisherTopPrivateDomain = publisherBaseUri.get().toString();
- String triggerDestinationTopPrivateDomain = destinationBaseUri.get().toString();
return new Attribution.Builder()
- .setSourceSite(publisherTopPrivateDomain)
- .setSourceOrigin(BaseUriExtractor.getBaseUri(source.getPublisher()).toString())
- .setDestinationSite(triggerDestinationTopPrivateDomain)
+ .setSourceSite(publisherTopPrivateDomain.get().toString())
+ .setSourceOrigin(source.getPublisher().toString())
+ .setDestinationSite(destinationTopPrivateDomain.get().toString())
.setDestinationOrigin(BaseUriExtractor.getBaseUri(destination).toString())
- .setAdTechDomain(trigger.getAdTechDomain().toString())
.setEnrollmentId(trigger.getEnrollmentId())
.setTriggerTime(trigger.getTriggerTime())
.setRegistrant(trigger.getRegistrant().toString())
.build();
}
- private static Optional<Uri> extractBaseUri(Uri uri, @EventSurfaceType int eventSurfaceType) {
+ private static Optional<Uri> getTopPrivateDomain(
+ Uri uri, @EventSurfaceType int eventSurfaceType) {
return eventSurfaceType == EventSurfaceType.APP
? Optional.of(BaseUriExtractor.getBaseUri(uri))
: Web.topPrivateDomainAndScheme(uri);
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceFetcher.java b/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceFetcher.java
index e70546fe05..4f96082c54 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceFetcher.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceFetcher.java
@@ -29,11 +29,14 @@ import android.adservices.measurement.WebSourceParams;
import android.adservices.measurement.WebSourceRegistrationRequest;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.content.Context;
import android.net.Uri;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.service.measurement.MeasurementHttpClient;
+import com.android.adservices.service.measurement.util.Enrollment;
import com.android.adservices.service.measurement.util.Web;
import com.android.internal.annotations.VisibleForTesting;
@@ -67,14 +70,17 @@ public class SourceFetcher {
private final String mDefaultAndroidAppScheme = "android-app";
private final String mDefaultAndroidAppUriPrefix = mDefaultAndroidAppScheme + "://";
private final MeasurementHttpClient mNetworkConnection = new MeasurementHttpClient();
+ private final EnrollmentDao mEnrollmentDao;
- public SourceFetcher() {
- this(new AdIdPermissionFetcher());
+ public SourceFetcher(Context context) {
+ mEnrollmentDao = EnrollmentDao.getInstance(context);
+ mAdIdPermissionFetcher = new AdIdPermissionFetcher();
}
@VisibleForTesting
- SourceFetcher(AdIdPermissionFetcher adIdPermissionFetcher) {
- this.mAdIdPermissionFetcher = adIdPermissionFetcher;
+ public SourceFetcher(EnrollmentDao enrollmentDao, AdIdPermissionFetcher adIdPermissionFetcher) {
+ mEnrollmentDao = enrollmentDao;
+ mAdIdPermissionFetcher = adIdPermissionFetcher;
}
private boolean parseCommonSourceParams(
@@ -214,7 +220,7 @@ public class SourceFetcher {
private boolean parseSource(
@NonNull Uri topOrigin,
- @NonNull Uri registrationUri,
+ @NonNull String enrollmentId,
@Nullable Uri appDestination,
@Nullable Uri webDestination,
boolean shouldValidateDestination,
@@ -224,7 +230,7 @@ public class SourceFetcher {
boolean isAllowDebugKey) {
SourceRegistration.Builder result = new SourceRegistration.Builder();
result.setTopOrigin(topOrigin);
- result.setRegistrationUri(registrationUri);
+ result.setEnrollmentId(enrollmentId);
List<String> field;
field = headers.get("Attribution-Reporting-Register-Source");
if (field == null || field.size() != 1) {
@@ -263,6 +269,7 @@ public class SourceFetcher {
/** Provided a testing hook. */
@NonNull
+ @VisibleForTesting
public URLConnection openUrl(@NonNull URL url) throws IOException {
return mNetworkConnection.setup(url);
}
@@ -289,6 +296,13 @@ public class SourceFetcher {
LogUtil.d(e, "Malformed registration target URL");
return;
}
+ Optional<String> enrollmentId =
+ Enrollment.maybeGetEnrollmentId(registrationUri, mEnrollmentDao);
+ if (!enrollmentId.isPresent()) {
+ LogUtil.d("fetchSource: unable to find enrollment ID. Registration URI: %s",
+ registrationUri);
+ return;
+ }
HttpURLConnection urlConnection;
try {
urlConnection = (HttpURLConnection) openUrl(url);
@@ -311,7 +325,7 @@ public class SourceFetcher {
final boolean parsed =
parseSource(
topOrigin,
- registrationUri,
+ enrollmentId.get(),
appDestination,
webDestination,
shouldValidateDestination,
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceRegistration.java b/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceRegistration.java
index 8ffe370aaa..2d0028d109 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceRegistration.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/registration/SourceRegistration.java
@@ -33,7 +33,7 @@ import java.util.Optional;
*/
public final class SourceRegistration {
private final Uri mTopOrigin;
- private final Uri mRegistrationUri;
+ private final String mEnrollmentId;
private final Uri mAppDestination;
private final Uri mWebDestination;
private final long mSourceEventId;
@@ -48,7 +48,7 @@ public final class SourceRegistration {
/** Create a new source registration. */
private SourceRegistration(
@NonNull Uri topOrigin,
- @NonNull Uri registrationUri,
+ @NonNull String enrollmentId,
@Nullable Uri appDestination,
@Nullable Uri webDestination,
long sourceEventId,
@@ -60,7 +60,7 @@ public final class SourceRegistration {
@Nullable String aggregateSource,
@Nullable String aggregateFilterData) {
mTopOrigin = topOrigin;
- mRegistrationUri = registrationUri;
+ mEnrollmentId = enrollmentId;
mAppDestination = appDestination;
mWebDestination = webDestination;
mSourceEventId = sourceEventId;
@@ -84,7 +84,7 @@ public final class SourceRegistration {
&& mInstallAttributionWindow == that.mInstallAttributionWindow
&& mInstallCooldownWindow == that.mInstallCooldownWindow
&& Objects.equals(mTopOrigin, that.mTopOrigin)
- && Objects.equals(mRegistrationUri, that.mRegistrationUri)
+ && Objects.equals(mEnrollmentId, that.mEnrollmentId)
&& Objects.equals(mAppDestination, that.mAppDestination)
&& Objects.equals(mWebDestination, that.mWebDestination)
&& Objects.equals(mAggregateSource, that.mAggregateSource)
@@ -96,7 +96,7 @@ public final class SourceRegistration {
public int hashCode() {
return Objects.hash(
mTopOrigin,
- mRegistrationUri,
+ mEnrollmentId,
mAppDestination,
mWebDestination,
mSourceEventId,
@@ -115,10 +115,10 @@ public final class SourceRegistration {
return mTopOrigin;
}
- /** Uri used to request this registration. */
+ /** Enrollment ID associated with this registration. */
@NonNull
- public Uri getRegistrationUri() {
- return mRegistrationUri;
+ public String getEnrollmentId() {
+ return mEnrollmentId;
}
/** OS (app) destination Uri. */
@@ -189,7 +189,7 @@ public final class SourceRegistration {
*/
public static final class Builder {
private Uri mTopOrigin;
- private Uri mRegistrationUri;
+ private String mEnrollmentId;
private Uri mAppDestination;
private Uri mWebDestination;
private long mSourceEventId;
@@ -215,11 +215,10 @@ public final class SourceRegistration {
return this;
}
- /** See {@link SourceRegistration#getRegistrationUri}. */
+ /** See {@link SourceRegistration#getEnrollmentId}. */
@NonNull
- public Builder setRegistrationUri(@NonNull Uri registrationUri) {
- Validation.validateUri(registrationUri);
- mRegistrationUri = registrationUri;
+ public Builder setEnrollmentId(@NonNull String enrollmentId) {
+ mEnrollmentId = enrollmentId;
return this;
}
@@ -303,7 +302,7 @@ public final class SourceRegistration {
/** Build the SourceRegistration. */
@NonNull
public SourceRegistration build() {
- Validation.validateNonNull(mTopOrigin, mRegistrationUri);
+ Validation.validateNonNull(mTopOrigin, mEnrollmentId);
if (mAppDestination == null && mWebDestination == null) {
throw new IllegalArgumentException(
@@ -312,7 +311,7 @@ public final class SourceRegistration {
return new SourceRegistration(
mTopOrigin,
- mRegistrationUri,
+ mEnrollmentId,
mAppDestination,
mWebDestination,
mSourceEventId,
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerFetcher.java b/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerFetcher.java
index bdff0ec27a..68d6907a02 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerFetcher.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerFetcher.java
@@ -21,11 +21,14 @@ import android.adservices.measurement.RegistrationRequest;
import android.adservices.measurement.WebTriggerParams;
import android.adservices.measurement.WebTriggerRegistrationRequest;
import android.annotation.NonNull;
+import android.content.Context;
import android.net.Uri;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.service.measurement.MeasurementHttpClient;
+import com.android.adservices.service.measurement.util.Enrollment;
import com.android.internal.annotations.VisibleForTesting;
import org.json.JSONArray;
@@ -54,26 +57,30 @@ public class TriggerFetcher {
private final ExecutorService mIoExecutor = AdServicesExecutors.getBlockingExecutor();
private final AdIdPermissionFetcher mAdIdPermissionFetcher;
private final MeasurementHttpClient mNetworkConnection = new MeasurementHttpClient();
+ private final EnrollmentDao mEnrollmentDao;
- public TriggerFetcher() {
- this(new AdIdPermissionFetcher());
+ public TriggerFetcher(Context context) {
+ mEnrollmentDao = EnrollmentDao.getInstance(context);
+ mAdIdPermissionFetcher = new AdIdPermissionFetcher();
}
@VisibleForTesting
- TriggerFetcher(AdIdPermissionFetcher adIdPermissionFetcher) {
- this.mAdIdPermissionFetcher = adIdPermissionFetcher;
+ public TriggerFetcher(EnrollmentDao enrollmentDao,
+ AdIdPermissionFetcher adIdPermissionFetcher) {
+ mEnrollmentDao = enrollmentDao;
+ mAdIdPermissionFetcher = adIdPermissionFetcher;
}
private boolean parseTrigger(
@NonNull Uri topOrigin,
- @NonNull Uri registrationUri,
+ @NonNull String enrollmentId,
@NonNull Map<String, List<String>> headers,
@NonNull List<TriggerRegistration> addToResults,
boolean isWebSource,
boolean isAllowDebugKey) {
TriggerRegistration.Builder result = new TriggerRegistration.Builder();
result.setTopOrigin(topOrigin);
- result.setRegistrationUri(registrationUri);
+ result.setEnrollmentId(enrollmentId);
List<String> field;
field = headers.get("Attribution-Reporting-Register-Trigger");
if (field == null || field.size() != 1) {
@@ -145,6 +152,13 @@ public class TriggerFetcher {
LogUtil.d(e, "Malformed registration registrationUri URL");
return;
}
+ Optional<String> enrollmentId =
+ Enrollment.maybeGetEnrollmentId(registrationUri, mEnrollmentDao);
+ if (!enrollmentId.isPresent()) {
+ LogUtil.d("fetchTrigger: unable to find enrollment ID. Registration URI: %s",
+ registrationUri);
+ return;
+ }
HttpURLConnection urlConnection;
try {
urlConnection = (HttpURLConnection) openUrl(url);
@@ -168,7 +182,7 @@ public class TriggerFetcher {
final boolean parsed =
parseTrigger(
topOrigin,
- registrationUri,
+ enrollmentId.get(),
headers,
registrationsOut,
isWebSource,
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerRegistration.java b/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerRegistration.java
index 7e3993a981..3f25856092 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerRegistration.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/registration/TriggerRegistration.java
@@ -28,7 +28,7 @@ import java.util.Objects;
*/
public final class TriggerRegistration {
private final Uri mTopOrigin;
- private final Uri mRegistrationUri;
+ private final String mEnrollmentId;
private final String mAggregateTriggerData;
private final String mAggregateValues;
private final String mFilters;
@@ -38,14 +38,14 @@ public final class TriggerRegistration {
/** Create a trigger registration. */
private TriggerRegistration(
@NonNull Uri topOrigin,
- @NonNull Uri registrationUri,
+ @NonNull String enrollmentId,
@NonNull String eventTriggers,
@Nullable String aggregateTriggerData,
@Nullable String aggregateValues,
@Nullable String filters,
@Nullable Long debugKey) {
mTopOrigin = topOrigin;
- mRegistrationUri = registrationUri;
+ mEnrollmentId = enrollmentId;
mAggregateTriggerData = aggregateTriggerData;
mAggregateValues = aggregateValues;
mFilters = filters;
@@ -59,7 +59,7 @@ public final class TriggerRegistration {
if (!(o instanceof TriggerRegistration)) return false;
TriggerRegistration that = (TriggerRegistration) o;
return Objects.equals(mTopOrigin, that.mTopOrigin)
- && Objects.equals(mRegistrationUri, that.mRegistrationUri)
+ && Objects.equals(mEnrollmentId, that.mEnrollmentId)
&& Objects.equals(mAggregateTriggerData, that.mAggregateTriggerData)
&& Objects.equals(mAggregateValues, that.mAggregateValues)
&& Objects.equals(mFilters, that.mFilters)
@@ -71,7 +71,7 @@ public final class TriggerRegistration {
public int hashCode() {
return Objects.hash(
mTopOrigin,
- mRegistrationUri,
+ mEnrollmentId,
mAggregateTriggerData,
mAggregateValues,
mFilters,
@@ -85,10 +85,10 @@ public final class TriggerRegistration {
return mTopOrigin;
}
- /** Uri used to request this registration. */
+ /** Enrollment ID associated with this registration. */
@NonNull
- public Uri getRegistrationUri() {
- return mRegistrationUri;
+ public String getEnrollmentId() {
+ return mEnrollmentId;
}
/** Event triggers - contains trigger data, priority, de-dup key and event-level filters. */
@@ -125,7 +125,7 @@ public final class TriggerRegistration {
*/
public static final class Builder {
private Uri mTopOrigin;
- private Uri mRegistrationUri;
+ private String mEnrollmentId;
private String mEventTriggers;
private String mAggregateTriggerData;
private String mAggregateValues;
@@ -140,11 +140,10 @@ public final class TriggerRegistration {
return this;
}
- /** See {@link TriggerRegistration#getRegistrationUri}. */
+ /** See {@link TriggerRegistration#getEnrollmentId}. */
@NonNull
- public Builder setRegistrationUri(@NonNull Uri registrationUri) {
- Validation.validateUri(registrationUri);
- mRegistrationUri = registrationUri;
+ public Builder setEnrollmentId(@NonNull String enrollmentId) {
+ mEnrollmentId = enrollmentId;
return this;
}
@@ -186,11 +185,11 @@ public final class TriggerRegistration {
/** Build the TriggerRegistration. */
@NonNull
public TriggerRegistration build() {
- Validation.validateNonNull(mTopOrigin, mRegistrationUri);
+ Validation.validateNonNull(mTopOrigin, mEnrollmentId);
return new TriggerRegistration(
mTopOrigin,
- mRegistrationUri,
+ mEnrollmentId,
mEventTriggers,
mAggregateTriggerData,
mAggregateValues,
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateFallbackReportingJobService.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateFallbackReportingJobService.java
index 0a41738773..665d0dbc54 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateFallbackReportingJobService.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateFallbackReportingJobService.java
@@ -25,6 +25,7 @@ import android.content.Context;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.service.AdServicesConfig;
import com.android.adservices.service.FlagsFactory;
@@ -54,6 +55,7 @@ public final class AggregateFallbackReportingJobService extends JobService {
sBlockingExecutor.execute(() -> {
boolean success = new AggregateReportingJobHandler(
+ EnrollmentDao.getInstance(getApplicationContext()),
DatastoreManagerFactory.getDatastoreManager(
getApplicationContext()))
.performScheduledPendingReportsInWindow(
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandler.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandler.java
index 3422ab7701..385f0b36c1 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandler.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandler.java
@@ -23,10 +23,12 @@ import android.adservices.common.AdServicesStatusUtils;
import android.net.Uri;
import com.android.adservices.LogUtil;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKey;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKeyManager;
import com.android.adservices.service.measurement.aggregation.AggregateReport;
+import com.android.adservices.service.measurement.util.Enrollment;
import com.android.adservices.service.stats.AdServicesLoggerImpl;
import com.android.adservices.service.stats.MeasurementReportsStats;
import com.android.internal.annotations.VisibleForTesting;
@@ -46,18 +48,22 @@ import java.util.concurrent.TimeUnit;
public class AggregateReportingJobHandler {
+ private final EnrollmentDao mEnrollmentDao;
private final DatastoreManager mDatastoreManager;
private final AggregateEncryptionKeyManager mAggregateEncryptionKeyManager;
- AggregateReportingJobHandler(DatastoreManager datastoreManager) {
+ AggregateReportingJobHandler(EnrollmentDao enrollmentDao, DatastoreManager datastoreManager) {
+ mEnrollmentDao = enrollmentDao;
mDatastoreManager = datastoreManager;
mAggregateEncryptionKeyManager = new AggregateEncryptionKeyManager(datastoreManager);
}
@VisibleForTesting
AggregateReportingJobHandler(
+ EnrollmentDao enrollmentDao,
DatastoreManager datastoreManager,
AggregateEncryptionKeyManager aggregateEncryptionKeyManager) {
+ mEnrollmentDao = enrollmentDao;
mDatastoreManager = datastoreManager;
mAggregateEncryptionKeyManager = aggregateEncryptionKeyManager;
}
@@ -119,9 +125,16 @@ public class AggregateReportingJobHandler {
return AdServicesStatusUtils.STATUS_INVALID_ARGUMENT;
}
try {
- JSONObject aggregateReportJsonBody = createReportJsonPayload(aggregateReport, key);
- int returnCode = makeHttpPostRequest(aggregateReport.getAdTechDomain(),
- aggregateReportJsonBody);
+ Optional<Uri> reportingOrigin = Enrollment.maybeGetReportingOrigin(
+ aggregateReport.getEnrollmentId(), mEnrollmentDao);
+ if (!reportingOrigin.isPresent()) {
+ // We do not know here what the cause is of the failure to retrieve the reporting
+ // origin. INTERNAL_ERROR seems the closest to a "catch-all" error code.
+ return AdServicesStatusUtils.STATUS_INTERNAL_ERROR;
+ }
+ JSONObject aggregateReportJsonBody = createReportJsonPayload(
+ aggregateReport, reportingOrigin.get(), key);
+ int returnCode = makeHttpPostRequest(reportingOrigin.get(), aggregateReportJsonBody);
if (returnCode >= HttpURLConnection.HTTP_OK
&& returnCode <= 299) {
@@ -142,8 +155,8 @@ public class AggregateReportingJobHandler {
/** Creates the JSON payload for the POST request from the AggregateReport. */
@VisibleForTesting
- JSONObject createReportJsonPayload(AggregateReport aggregateReport, AggregateEncryptionKey key)
- throws JSONException {
+ JSONObject createReportJsonPayload(AggregateReport aggregateReport, Uri reportingOrigin,
+ AggregateEncryptionKey key) throws JSONException {
return new AggregateReportBody.Builder()
.setReportId(aggregateReport.getId())
.setAttributionDestination(aggregateReport.getAttributionDestination().toString())
@@ -156,7 +169,7 @@ public class AggregateReportingJobHandler {
TimeUnit.MILLISECONDS.toSeconds(
aggregateReport.getScheduledReportTime())))
.setApiVersion(aggregateReport.getApiVersion())
- .setReportingOrigin(aggregateReport.getAdTechDomain().toString())
+ .setReportingOrigin(reportingOrigin.toString())
.setDebugCleartextPayload(aggregateReport.getDebugCleartextPayload())
.build()
.toJson(key);
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobService.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobService.java
index b79976e628..eb1516ca43 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobService.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/AggregateReportingJobService.java
@@ -25,6 +25,7 @@ import android.content.Context;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.service.AdServicesConfig;
import com.android.adservices.service.FlagsFactory;
@@ -54,6 +55,7 @@ public final class AggregateReportingJobService extends JobService {
sBlockingExecutor.execute(() -> {
boolean success = new AggregateReportingJobHandler(
+ EnrollmentDao.getInstance(getApplicationContext()),
DatastoreManagerFactory.getDatastoreManager(
getApplicationContext()))
.performScheduledPendingReportsInWindow(
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventFallbackReportingJobService.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventFallbackReportingJobService.java
index ebb576f7b8..6180bc9009 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventFallbackReportingJobService.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventFallbackReportingJobService.java
@@ -25,6 +25,7 @@ import android.content.Context;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.service.AdServicesConfig;
import com.android.adservices.service.FlagsFactory;
@@ -55,6 +56,7 @@ public final class EventFallbackReportingJobService extends JobService {
sBlockingExecutor.execute(() -> {
boolean success = new EventReportingJobHandler(
+ EnrollmentDao.getInstance(getApplicationContext()),
DatastoreManagerFactory.getDatastoreManager(
getApplicationContext()))
.performScheduledPendingReportsInWindow(
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobHandler.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobHandler.java
index f070794668..52deeceb1f 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobHandler.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobHandler.java
@@ -23,8 +23,10 @@ import android.adservices.common.AdServicesStatusUtils;
import android.net.Uri;
import com.android.adservices.LogUtil;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.service.measurement.EventReport;
+import com.android.adservices.service.measurement.util.Enrollment;
import com.android.adservices.service.stats.AdServicesLoggerImpl;
import com.android.adservices.service.stats.MeasurementReportsStats;
import com.android.internal.annotations.VisibleForTesting;
@@ -42,9 +44,11 @@ import java.util.Optional;
*/
public class EventReportingJobHandler {
+ private final EnrollmentDao mEnrollmentDao;
private final DatastoreManager mDatastoreManager;
- EventReportingJobHandler(DatastoreManager datastoreManager) {
+ EventReportingJobHandler(EnrollmentDao enrollmentDao, DatastoreManager datastoreManager) {
+ mEnrollmentDao = enrollmentDao;
mDatastoreManager = datastoreManager;
}
@@ -94,9 +98,15 @@ public class EventReportingJobHandler {
return AdServicesStatusUtils.STATUS_INVALID_ARGUMENT;
}
try {
+ Optional<Uri> reportingOrigin = Enrollment.maybeGetReportingOrigin(
+ eventReport.getEnrollmentId(), mEnrollmentDao);
+ if (!reportingOrigin.isPresent()) {
+ // We do not know here what the cause is of the failure to retrieve the reporting
+ // origin. INTERNAL_ERROR seems the closest to a "catch-all" error code.
+ return AdServicesStatusUtils.STATUS_INTERNAL_ERROR;
+ }
JSONObject eventReportJsonPayload = createReportJsonPayload(eventReport);
- int returnCode = makeHttpPostRequest(eventReport.getAdTechDomain(),
- eventReportJsonPayload);
+ int returnCode = makeHttpPostRequest(reportingOrigin.get(), eventReportJsonPayload);
if (returnCode >= HttpURLConnection.HTTP_OK
&& returnCode <= 299) {
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobService.java b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobService.java
index e9842505e9..fb61c9966e 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobService.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/reporting/EventReportingJobService.java
@@ -25,6 +25,7 @@ import android.content.Context;
import com.android.adservices.LogUtil;
import com.android.adservices.concurrency.AdServicesExecutors;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.service.AdServicesConfig;
import com.android.adservices.service.FlagsFactory;
@@ -55,6 +56,7 @@ public final class EventReportingJobService extends JobService {
LogUtil.d("EventReportingJobService: onStartJob: ");
sBlockingExecutor.execute(() -> {
boolean success = new EventReportingJobHandler(
+ EnrollmentDao.getInstance(getApplicationContext()),
DatastoreManagerFactory.getDatastoreManager(
getApplicationContext()))
.performScheduledPendingReportsInWindow(
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/util/Enrollment.java b/adservices/service-core/java/com/android/adservices/service/measurement/util/Enrollment.java
new file mode 100644
index 0000000000..e0c736458f
--- /dev/null
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/util/Enrollment.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.adservices.service.measurement.util;
+
+import android.net.Uri;
+
+import com.android.adservices.data.enrollment.EnrollmentDao;
+import com.android.adservices.service.enrollment.EnrollmentData;
+
+import java.util.Optional;
+
+/** Enrollment utilities for measurement. */
+public final class Enrollment {
+
+ private Enrollment() { }
+
+ /**
+ * Returns an {@code Optional<String>} of the ad-tech enrollment record ID.
+ *
+ * @param registrationUri the ad-tech URL used to register a source or trigger.
+ * @param enrollmentDao an instance of {@code EnrollmentDao}.
+ */
+ public static Optional<String> maybeGetEnrollmentId(Uri registrationUri,
+ EnrollmentDao enrollmentDao) {
+ Uri uriWithoutParams = registrationUri.buildUpon().clearQuery().fragment(null).build();
+ EnrollmentData enrollmentData = enrollmentDao.getEnrollmentDataFromMeasurementUrl(
+ uriWithoutParams.toString());
+ if (enrollmentData != null && enrollmentData.getEnrollmentId() != null) {
+ return Optional.of(enrollmentData.getEnrollmentId());
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * Returns an {@code Optional<Uri>} of the ad-tech server URL that accepts attribution reports.
+ *
+ * @param enrollmentId the enrollment record ID.
+ * @param enrollmentDao an instance of {@code EnrollmentDao}.
+ */
+ public static Optional<Uri> maybeGetReportingOrigin(String enrollmentId,
+ EnrollmentDao enrollmentDao) {
+ EnrollmentData enrollmentData = enrollmentDao.getEnrollmentData(enrollmentId);
+ if (enrollmentData != null && enrollmentData.getAttributionReportingUrl().size() > 0) {
+ return Optional.of(Uri.parse(enrollmentData.getAttributionReportingUrl().get(0)));
+ }
+ return Optional.empty();
+ }
+}
diff --git a/adservices/service-core/java/com/android/adservices/service/measurement/util/Web.java b/adservices/service-core/java/com/android/adservices/service/measurement/util/Web.java
index d4fe36d7bc..cf6f04a99a 100644
--- a/adservices/service-core/java/com/android/adservices/service/measurement/util/Web.java
+++ b/adservices/service-core/java/com/android/adservices/service/measurement/util/Web.java
@@ -22,7 +22,7 @@ import com.google.common.net.InternetDomainName;
import java.util.Optional;
-/** Filtering utilities for measurement. */
+/** Web utilities for measurement. */
public final class Web {
private Web() { }
diff --git a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/SourceFixture.java b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/SourceFixture.java
index 04ecd92dde..3107113641 100644
--- a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/SourceFixture.java
+++ b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/SourceFixture.java
@@ -41,9 +41,7 @@ public final class SourceFixture {
return new Source.Builder()
.setPublisher(ValidSourceParams.PUBLISHER)
.setAppDestination(ValidSourceParams.ATTRIBUTION_DESTINATION)
- .setAdTechDomain(ValidSourceParams.AD_TECH_DOMAIN)
- // TODO (b/238924528): uncomment when enforcing enrollment.
- //.setEnrollmentId(ValidSourceParams.ENROLLMENT_ID)
+ .setEnrollmentId(ValidSourceParams.ENROLLMENT_ID)
.setRegistrant(ValidSourceParams.REGISTRANT);
}
@@ -55,7 +53,6 @@ public final class SourceFixture {
.setPublisher(ValidSourceParams.PUBLISHER)
.setAppDestination(ValidSourceParams.ATTRIBUTION_DESTINATION)
.setWebDestination(ValidSourceParams.WEB_DESTINATION)
- .setAdTechDomain(ValidSourceParams.AD_TECH_DOMAIN)
.setEnrollmentId(ValidSourceParams.ENROLLMENT_ID)
.setRegistrant(ValidSourceParams.REGISTRANT)
.setEventTime(ValidSourceParams.SOURCE_EVENT_TIME)
@@ -80,7 +77,6 @@ public final class SourceFixture {
public static Uri WEB_DESTINATION = Uri.parse("https://destination.com");
public static final Uri PUBLISHER = Uri.parse("android-app://com.publisher");
public static final Uri REGISTRANT = Uri.parse("android-app://com.registrant");
- public static final Uri AD_TECH_DOMAIN = Uri.parse("https://com.example");
public static final String ENROLLMENT_ID = "enrollment-id";
public static final Source.SourceType SOURCE_TYPE = Source.SourceType.EVENT;
public static final Long INSTALL_ATTRIBUTION_WINDOW = 841839879274L;
diff --git a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/TriggerFixture.java b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/TriggerFixture.java
index 56d569b73f..9018725dc6 100644
--- a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/TriggerFixture.java
+++ b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/TriggerFixture.java
@@ -35,9 +35,7 @@ public final class TriggerFixture {
public static Trigger.Builder getValidTriggerBuilder() {
return new Trigger.Builder()
.setAttributionDestination(ValidTriggerParams.ATTRIBUTION_DESTINATION)
- .setAdTechDomain(ValidTriggerParams.AD_TECH_DOMAIN)
- // TODO (b/238924528): uncomment when enforcing enrollment
- //.setEnrollmentId(ValidTriggerParams.ENROLLMENT_ID)
+ .setEnrollmentId(ValidTriggerParams.ENROLLMENT_ID)
.setRegistrant(ValidTriggerParams.REGISTRANT);
}
@@ -46,7 +44,6 @@ public final class TriggerFixture {
public static Trigger getValidTrigger() {
return new Trigger.Builder()
.setAttributionDestination(ValidTriggerParams.ATTRIBUTION_DESTINATION)
- .setAdTechDomain(ValidTriggerParams.AD_TECH_DOMAIN)
.setEnrollmentId(ValidTriggerParams.ENROLLMENT_ID)
.setRegistrant(ValidTriggerParams.REGISTRANT)
.setTriggerTime(ValidTriggerParams.TRIGGER_TIME)
@@ -62,7 +59,6 @@ public final class TriggerFixture {
public static final Uri ATTRIBUTION_DESTINATION =
Uri.parse("android-app://com.destination");
public static final Uri REGISTRANT = Uri.parse("android-app://com.registrant");
- public static final Uri AD_TECH_DOMAIN = Uri.parse("https://com.example");
public static final String ENROLLMENT_ID = "enrollment-id";
public static final String TOP_LEVEL_FILTERS_JSON_STRING =
"{\n"
diff --git a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/AggregateReportFixture.java b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/AggregateReportFixture.java
index c208d045a6..cdcadc77a3 100644
--- a/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/AggregateReportFixture.java
+++ b/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/AggregateReportFixture.java
@@ -42,9 +42,7 @@ public final class AggregateReportFixture {
.setAttributionDestination(ValidAggregateReportParams.ATTRIBUTION_DESTINATION)
.setSourceRegistrationTime(ValidAggregateReportParams.SOURCE_REGISTRATION_TIME)
.setScheduledReportTime(ValidAggregateReportParams.TRIGGER_TIME + getRandomTime())
- .setAdTechDomain(ValidAggregateReportParams.AD_TECH_DOMAIN)
- // TODO (b/238924528): uncomment when enforcing enrollment
- //.setEnrollmentId(ValidAggregateReportParams.ENROLLMENT_ID)
+ .setEnrollmentId(ValidAggregateReportParams.ENROLLMENT_ID)
.setDebugCleartextPayload(ValidAggregateReportParams.getDebugPayload())
.setStatus(EventReport.Status.PENDING)
.build();
@@ -56,7 +54,6 @@ public final class AggregateReportFixture {
Uri.parse("android-app://com.destination");
public static final long SOURCE_REGISTRATION_TIME = 8640000000L;
public static final long TRIGGER_TIME = 8640000000L;
- public static final Uri AD_TECH_DOMAIN = Uri.parse("https://com.example");
public static final String ENROLLMENT_ID = "enrollment-id";
public static final String getDebugPayload() {
diff --git a/adservices/tests/unittest/service-core/assets/aggregate_report_service_test.json b/adservices/tests/unittest/service-core/assets/aggregate_report_service_test.json
index b6fa6cdcda..90cad476ff 100644
--- a/adservices/tests/unittest/service-core/assets/aggregate_report_service_test.json
+++ b/adservices/tests/unittest/service-core/assets/aggregate_report_service_test.json
@@ -14,7 +14,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -33,7 +32,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -61,7 +59,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -80,7 +77,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -108,7 +104,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -127,7 +122,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -155,7 +149,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -166,7 +159,6 @@
"id": "AR2",
"scheduledReportTime": 19999000,
"sourceRegistrationTime": 19998000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -185,7 +177,6 @@
"id": "AR1",
"scheduledReportTime": 20000000,
"sourceRegistrationTime": 19999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -196,7 +187,6 @@
"id": "AR2",
"scheduledReportTime": 19999000,
"sourceRegistrationTime": 19998000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -224,7 +214,6 @@
"id": "AR1",
"scheduledReportTime": 10000000,
"sourceRegistrationTime": 9999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -235,7 +224,6 @@
"id": "AR2",
"scheduledReportTime": 23000000,
"sourceRegistrationTime": 22100000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -246,7 +234,6 @@
"id": "AR3",
"scheduledReportTime": 19999000,
"sourceRegistrationTime": 19998000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -265,7 +252,6 @@
"id": "AR1",
"scheduledReportTime": 10000000,
"sourceRegistrationTime": 9999000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -276,7 +262,6 @@
"id": "AR2",
"scheduledReportTime": 23000000,
"sourceRegistrationTime": 22100000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 0
@@ -287,7 +272,6 @@
"id": "AR3",
"scheduledReportTime": 19999000,
"sourceRegistrationTime": 19998000,
- "adTechDomain": "https://adtech.com",
"enrollmentId": "enrollment-id",
"debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
"status": 1
@@ -300,6 +284,52 @@
"start": 11000000,
"end": 20000000
}
+ },
+ {
+ "name": "Single pending report, retrieving enrollment fails",
+ "input": {
+ "sources": [],
+ "triggers": [],
+ "event_reports": [],
+ "attributions": [],
+ "aggregate_reports": [
+ {
+ "publisher": "https://source.site",
+ "attributionDestination": "https://attribution.destination",
+ "id": "AR1",
+ "scheduledReportTime": 20000000,
+ "sourceRegistrationTime": 19999000,
+ "enrollmentId": "enrollment-id",
+ "debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
+ "status": 0
+ }
+ ]
+ },
+ "output": {
+ "sources": [],
+ "triggers": [],
+ "event_reports": [],
+ "attributions": [],
+ "aggregate_reports": [
+ {
+ "publisher": "https://source.site",
+ "attributionDestination": "https://attribution.destination",
+ "id": "AR1",
+ "scheduledReportTime": 20000000,
+ "sourceRegistrationTime": 19999000,
+ "enrollmentId": "enrollment-id",
+ "debugCleartextPayload": "{\"operation\":\"histogram\",\"data\":[{\"bucket\":1369,\"value\":32768},{\"bucket\":3461,\"value\":1664}]}",
+ "status": 0
+ }
+ ]
+ },
+ "param": {
+ "responseCode": 200,
+ "action": "SINGLE_REPORT",
+ "result": 1,
+ "id": "AR1",
+ "notEnrolled": true
+ }
}
]
} \ No newline at end of file
diff --git a/adservices/tests/unittest/service-core/assets/attribution_service_test.json b/adservices/tests/unittest/service-core/assets/attribution_service_test.json
index 04af3e2791..b105d083a1 100644
--- a/adservices/tests/unittest/service-core/assets/attribution_service_test.json
+++ b/adservices/tests/unittest/service-core/assets/attribution_service_test.json
@@ -10,7 +10,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -23,7 +22,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -50,7 +48,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -63,7 +60,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -83,7 +79,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -100,7 +95,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -118,7 +112,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -131,7 +124,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d2",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -158,7 +150,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -171,7 +162,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d2",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 1,
"eventTriggers": [
@@ -202,7 +192,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -217,7 +206,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -230,7 +218,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -258,7 +245,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -273,7 +259,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -286,7 +271,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -307,7 +291,6 @@
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
"reportTime": 8643600030,
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -323,7 +306,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -341,7 +323,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -355,7 +336,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000002,
"expiryTime": 8640000030,
@@ -368,7 +348,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -395,7 +374,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -409,7 +387,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000002,
"expiryTime": 8640000030,
@@ -422,7 +399,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -443,7 +419,6 @@
"sourceId": 2,
"attributionDestination": "android-app://com.example.xyz",
"reportTime": 8643600030,
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000003,
@@ -459,7 +434,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example.xyz",
"destinationOrigin": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000003,
"registrant": "android-app://com.example.xyz"
@@ -478,7 +452,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -492,7 +465,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -507,7 +479,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -534,7 +505,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -548,7 +518,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -563,7 +532,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -584,7 +552,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -602,7 +569,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example.xyz",
"destinationOrigin": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -621,7 +587,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -635,7 +600,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -650,7 +614,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -678,7 +641,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -692,7 +654,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -707,7 +668,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -728,7 +688,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 9072000001,
@@ -746,7 +705,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example.xyz",
"destinationOrigin": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 9072000001,
"registrant": "android-app://com.example.xyz"
@@ -765,7 +723,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -779,7 +736,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -794,7 +750,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"priority": 101,
"status": 0,
@@ -822,7 +777,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -836,7 +790,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -851,7 +804,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -872,7 +824,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -890,7 +841,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example.xyz",
"destinationOrigin": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -909,7 +859,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -923,7 +872,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -938,7 +886,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -965,7 +912,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 10368000000,
@@ -979,7 +925,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 10368000000,
@@ -994,7 +939,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1015,7 +959,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 0,
"triggerTime": 9072000001,
@@ -1033,7 +976,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example.xyz",
"destinationOrigin": "android-app://com.example.xyz",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 9072000001,
"registrant": "android-app://com.example.xyz"
@@ -1053,7 +995,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1066,7 +1007,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1094,7 +1034,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1107,7 +1046,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1127,7 +1065,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -1144,7 +1081,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -1163,7 +1099,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1176,7 +1111,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1203,7 +1137,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1216,7 +1149,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1236,7 +1168,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 7,
"triggerTime": 8640000002,
@@ -1253,7 +1184,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -1272,7 +1202,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1283,7 +1212,6 @@
"triggers": [{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status":0,
"eventTriggers": [
@@ -1300,7 +1228,6 @@
}, {
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1326,7 +1253,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1337,7 +1263,6 @@
"triggers": [{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1354,7 +1279,6 @@
}, {
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 1,
"eventTriggers": [
@@ -1373,7 +1297,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 0,
"triggerTime": 8640000002,
@@ -1389,7 +1312,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -1407,7 +1329,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1418,7 +1339,6 @@
"triggers": [{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1435,7 +1355,6 @@
}, {
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1461,7 +1380,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1472,7 +1390,6 @@
"triggers": [{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1489,7 +1406,6 @@
}, {
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1508,7 +1424,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000003,
@@ -1525,7 +1440,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -1536,7 +1450,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000003,
"registrant": "android-app://com.example.xyz"
@@ -1554,7 +1467,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1567,7 +1479,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1585,7 +1496,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1603,7 +1513,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1621,7 +1530,6 @@
{
"id": "T4",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1648,7 +1556,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1661,7 +1568,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1679,7 +1585,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1697,7 +1602,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1715,7 +1619,6 @@
{
"id": "T4",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1736,7 +1639,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000003,
@@ -1750,7 +1652,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 3,
"triggerTime": 8640000004,
@@ -1764,7 +1665,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 4,
"triggerTime": 8640000005,
@@ -1782,7 +1682,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -1793,7 +1692,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000003,
"registrant": "android-app://com.example.xyz"
@@ -1804,7 +1702,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000004,
"registrant": "android-app://com.example.xyz"
@@ -1815,7 +1712,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000005,
"registrant": "android-app://com.example.xyz"
@@ -1835,7 +1731,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1848,7 +1743,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1866,7 +1760,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1884,7 +1777,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1902,7 +1794,6 @@
{
"id": "T4",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -1930,7 +1821,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -1943,7 +1833,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1961,7 +1850,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1979,7 +1867,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -1997,7 +1884,6 @@
{
"id": "T4",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -2018,7 +1904,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -2032,7 +1917,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000003,
@@ -2046,7 +1930,6 @@
"id": "unused",
"sourceId": 1,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 4,
"triggerTime": 8640000005,
@@ -2064,7 +1947,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -2075,7 +1957,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000003,
"registrant": "android-app://com.example.xyz"
@@ -2086,7 +1967,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000004,
"registrant": "android-app://com.example.xyz"
@@ -2097,7 +1977,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000005,
"registrant": "android-app://com.example.xyz"
@@ -2116,7 +1995,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -2131,7 +2009,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2145,7 +2022,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2173,7 +2049,6 @@
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
"enrollmentId": "enrollment-id-3",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -2188,7 +2063,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2202,7 +2076,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 1,
"eventTriggers": [
@@ -2233,7 +2106,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -2248,7 +2120,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2262,7 +2133,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2289,7 +2159,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -2304,7 +2173,6 @@
"sourceType": "navigation",
"publisher": "https://www.example1.com",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2318,7 +2186,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 1,
"eventTriggers": [
@@ -2350,7 +2217,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2367,7 +2233,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2396,7 +2261,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2413,7 +2277,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -2435,7 +2298,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -2453,7 +2315,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -2473,7 +2334,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2491,7 +2351,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2520,7 +2379,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2538,7 +2396,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 1,
"eventTriggers": [
@@ -2570,7 +2427,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2587,7 +2443,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2625,7 +2480,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2642,7 +2496,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -2674,7 +2527,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 0,
"triggerTime": 8640000002,
@@ -2692,7 +2544,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -2711,7 +2562,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2728,7 +2578,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2762,7 +2611,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2779,7 +2627,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -2807,7 +2654,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -2825,7 +2671,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -2845,7 +2690,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2863,7 +2707,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -2905,7 +2748,6 @@
"publisher": "https://www.example1.com",
"publisherType": 1,
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -2923,7 +2765,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -2958,7 +2799,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 0,
"triggerTime": 8640000002,
@@ -2976,7 +2816,6 @@
"sourceOrigin": "https://www.example1.com",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -2995,7 +2834,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -3012,7 +2850,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"eventTriggers": [
@@ -3057,7 +2894,6 @@
"sourceType": "event",
"publisher": "android-app://com.example.abc",
"appDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000000,
"expiryTime": 8640000030,
@@ -3074,7 +2910,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"status": 2,
"eventTriggers": [
@@ -3113,7 +2948,6 @@
"id": "unused",
"sourceId": 2,
"attributionDestination": "android-app://com.example2.app/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 1,
"triggerTime": 8640000002,
@@ -3131,7 +2965,6 @@
"sourceOrigin": "android-app://com.example.abc",
"destinationSite": "android-app://com.example2.app",
"destinationOrigin": "android-app://com.example2.app",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
diff --git a/adservices/tests/unittest/service-core/assets/event_report_service_test.json b/adservices/tests/unittest/service-core/assets/event_report_service_test.json
index e6e23d100f..0e2fb006c2 100644
--- a/adservices/tests/unittest/service-core/assets/event_report_service_test.json
+++ b/adservices/tests/unittest/service-core/assets/event_report_service_test.json
@@ -11,7 +11,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -32,7 +31,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -62,7 +60,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -83,7 +80,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -113,7 +109,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -134,7 +129,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -164,7 +158,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -178,7 +171,6 @@
"id": "ER2",
"sourceId": 2,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8440000002,
@@ -199,7 +191,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -213,7 +204,6 @@
"id": "ER2",
"sourceId": 2,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8440000002,
@@ -243,7 +233,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -257,7 +246,6 @@
"id": "ER2",
"sourceId": 2,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8440000002,
@@ -271,7 +259,6 @@
"id": "ER3",
"sourceId": 3,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8240000002,
@@ -292,7 +279,6 @@
"id": "ER1",
"sourceId": 1,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -306,7 +292,6 @@
"id": "ER2",
"sourceId": 2,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8440000002,
@@ -320,7 +305,6 @@
"id": "ER2",
"sourceId": 3,
"attributionDestination": "android-app://com.example2/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8240000002,
@@ -338,6 +322,56 @@
"start": 8343600030,
"end": 8543600030
}
+ },
+ {
+ "name": "Single pending report, retrieving enrollment fails",
+ "input": {
+ "sources": [],
+ "triggers": [],
+ "attributions": [],
+ "event_reports": [
+ {
+ "id": "ER1",
+ "sourceId": 1,
+ "attributionDestination": "android-app://com.example2/d1",
+ "enrollmentId": "enrollment-id-3",
+ "triggerData": 2,
+ "triggerTime": 8640000002,
+ "status": 0,
+ "reportTime": 8643600030,
+ "triggerPriority": 101,
+ "sourceType": "navigation",
+ "randomizedTriggerRate": 0.0024263
+ }
+ ]
+ },
+ "output": {
+ "sources": [],
+ "triggers": [],
+ "attributions": [],
+ "event_reports": [
+ {
+ "id": "ER1",
+ "sourceId": 1,
+ "attributionDestination": "android-app://com.example2/d1",
+ "enrollmentId": "enrollment-id-3",
+ "triggerData": 2,
+ "triggerTime": 8640000002,
+ "status": 0,
+ "reportTime": 8643600030,
+ "triggerPriority": 101,
+ "sourceType": "navigation",
+ "randomizedTriggerRate": 0.0024263
+ }
+ ]
+ },
+ "param": {
+ "responseCode": 200,
+ "action": "SINGLE_REPORT",
+ "result": 1,
+ "id": "ER1",
+ "notEnrolled": true
+ }
}
]
} \ No newline at end of file
diff --git a/adservices/tests/unittest/service-core/assets/measurement_app_uninstall_deletion_test.json b/adservices/tests/unittest/service-core/assets/measurement_app_uninstall_deletion_test.json
index eae30817fc..7aed4529c2 100644
--- a/adservices/tests/unittest/service-core/assets/measurement_app_uninstall_deletion_test.json
+++ b/adservices/tests/unittest/service-core/assets/measurement_app_uninstall_deletion_test.json
@@ -10,7 +10,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -25,7 +24,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -55,7 +53,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -69,7 +66,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -84,7 +80,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://no-match.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -104,7 +99,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -119,7 +113,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://no-match.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -143,7 +136,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -156,7 +148,6 @@
{
"id": "T1",
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"triggerTime": 8640000002,
@@ -174,7 +165,6 @@
{
"id": "T2",
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"triggerTime": 8640000002,
@@ -195,7 +185,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://no-match.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -215,7 +204,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -228,7 +216,6 @@
{
"id": "T2",
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"triggerTime": 8640000002,
@@ -249,7 +236,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://no-match.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -273,7 +259,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -286,7 +271,6 @@
{
"id": "T1",
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"triggerTime": 8640000002,
@@ -307,7 +291,6 @@
"id": "R1",
"sourceId": 1,
"attributionDestination": "android-app://remove.me",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -320,7 +303,6 @@
"id": "R2",
"sourceId": 1,
"attributionDestination": "android-app://remove.me",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -333,7 +315,6 @@
"id": "R3",
"sourceId": 1,
"attributionDestination": "android-app://dont.remove.me",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -353,7 +334,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -366,7 +346,6 @@
{
"id": "T1",
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"status": 0,
"triggerTime": 8640000002,
@@ -387,7 +366,6 @@
"id": "R3",
"sourceId": 1,
"attributionDestination": "android-app://dont.remove.me",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -411,7 +389,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -426,7 +403,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://dont.remove.me",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -443,7 +419,6 @@
"sourceOrigin": "android-app://remove.me",
"destinationSite": "android-app://no.match",
"destinationOrigin": "android-app://no.match",
- "adTechDomain": "https://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 10,
"registrant": "android-app://com.example.xyz"
@@ -454,7 +429,6 @@
"sourceOrigin": "android-app://no.match",
"destinationSite": "android-app://remove.me",
"destinationOrigin": "android-app://remove.me",
- "adTechDomain": "https://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 10,
"registrant": "android-app://com.example.xyz"
@@ -465,7 +439,6 @@
"sourceOrigin": "android-app://dont.remove.me",
"destinationSite": "android-app://dont.remove.me",
"destinationOrigin": "android-app://dont.remove.me",
- "adTechDomain": "https://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 10,
"registrant": "android-app://com.example.xyz"
@@ -480,7 +453,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://example2.com",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -495,7 +467,6 @@
"id": "id",
"sourceId": 1,
"attributionDestination": "android-app://example2.com",
- "adTechDomain": "https://dont.remove.me",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -512,7 +483,6 @@
"sourceOrigin": "android-app://dont.remove.me",
"destinationSite": "android-app://dont.remove.me",
"destinationOrigin": "android-app://dont.remove.me",
- "adTechDomain": "https://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 10,
"registrant": "android-app://com.example.xyz"
@@ -531,7 +501,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com",
"appDestination": "android-app://remove.me",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -545,7 +514,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.xyz",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -566,7 +534,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.example.xyz",
"appDestination": "android-app://com.example.xyz",
- "adTechDomain": "https://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
diff --git a/adservices/tests/unittest/service-core/assets/measurement_delete_expired_test.json b/adservices/tests/unittest/service-core/assets/measurement_delete_expired_test.json
index d1e9c09740..b73ad15cb7 100644
--- a/adservices/tests/unittest/service-core/assets/measurement_delete_expired_test.json
+++ b/adservices/tests/unittest/service-core/assets/measurement_delete_expired_test.json
@@ -10,7 +10,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com/s1",
"appDestination": "android-app://example2.com/d1",
- "adTechDomain": "android-app://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -24,7 +23,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com/s1",
"appDestination": "android-app://example2.com/d1",
- "adTechDomain": "android-app://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 33203622330000,
"expiryTime": 8640000030,
@@ -45,7 +43,6 @@
"sourceType": "navigation",
"publisher": "android-app://example1.com/s1",
"appDestination": "android-app://example2.com/d1",
- "adTechDomain": "android-app://example3.com",
"enrollmentId": "enrollment-id-3",
"eventTime": 33203622330000,
"expiryTime": 8640000030,
@@ -67,7 +64,6 @@
{
"id": "old1",
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"priority": 101,
"status": 0,
@@ -87,7 +83,6 @@
{
"id": "young1",
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"priority": 101,
"status": 0,
@@ -114,7 +109,6 @@
{
"id": "young1",
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"priority": 101,
"status": 0,
@@ -146,7 +140,6 @@
"id": "delivered1",
"sourceId": 1,
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -159,7 +152,6 @@
"id": "young1",
"sourceId": 1,
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -179,7 +171,6 @@
"id": "young1",
"sourceId": 1,
"attributionDestination": "https://www.example2.com/d1",
- "adTechDomain": "https://www.example3.com",
"enrollmentId": "enrollment-id-3",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -205,7 +196,6 @@
"sourceOrigin": "android-app://remove.me",
"destinationSite": "android-app://remove.me",
"destinationOrigin": "android-app://remove.me",
- "adTechDomain": "android-app://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 8640000002,
"registrant": "android-app://com.example.xyz"
@@ -216,7 +206,6 @@
"sourceOrigin": "android-app://dont.remove.me",
"destinationSite": "android-app://dont.remove.me",
"destinationOrigin": "android-app://dont.remove.me",
- "adTechDomain": "android-app://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 33203622330000,
"registrant": "android-app://com.example.xyz"
@@ -234,7 +223,6 @@
"sourceOrigin": "android-app://dont.remove.me",
"destinationSite": "android-app://dont.remove.me",
"destinationOrigin": "android-app://dont.remove.me",
- "adTechDomain": "android-app://example.one",
"enrollmentId": "enrollment-id-1",
"triggerTime": 33203622330000,
"registrant": "android-app://com.example.xyz"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/registrant_not_found.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/registrant_not_found.json
index 421a31a307..c1153ccd6a 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/registrant_not_found.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/registrant_not_found.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -53,7 +50,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -74,7 +70,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -87,7 +82,6 @@
"id": "E2",
"sourceId": 2,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -104,7 +98,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant1"
@@ -115,7 +108,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 11,
"registrant": "android-app://com.registrant2"
@@ -130,7 +122,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -144,7 +135,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -157,7 +147,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -175,7 +164,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -196,7 +184,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -209,7 +196,6 @@
"id": "E2",
"sourceId": 2,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -226,7 +212,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant1"
@@ -237,7 +222,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 11,
"registrant": "android-app://com.registrant2"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain.json
index a45cef20ae..18ab8ccf58 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -64,7 +60,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -84,7 +79,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -104,7 +98,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -124,7 +117,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -147,7 +139,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -160,7 +151,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -173,7 +163,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -186,7 +175,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -199,7 +187,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -212,7 +199,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -229,7 +215,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -240,7 +225,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -251,7 +235,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -262,7 +245,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -277,7 +259,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -291,7 +272,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -304,7 +284,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -324,7 +303,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -347,7 +325,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -360,7 +337,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -377,7 +353,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -388,7 +363,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain_preserve.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain_preserve.json
index 5d2b0fcaec..cab136da19 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain_preserve.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_multiple_origin_no_domain_preserve.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -64,7 +60,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -84,7 +79,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -104,7 +98,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -124,7 +117,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -147,7 +139,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -160,7 +151,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -173,7 +163,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -186,7 +175,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -199,7 +187,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -212,7 +199,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -229,7 +215,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -240,7 +225,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -251,7 +235,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -262,7 +245,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -273,7 +255,6 @@
"sourceOrigin": "https://site2.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -288,7 +269,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -302,7 +282,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -316,7 +295,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -329,7 +307,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -349,7 +326,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -369,7 +345,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -392,7 +367,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -405,7 +379,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -418,7 +391,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -431,7 +403,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -444,7 +415,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -461,7 +431,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain.json
index e4a638dcf5..683075d30b 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -64,7 +60,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -84,7 +79,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -104,7 +98,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.asite.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -124,7 +117,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -147,7 +139,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -160,7 +151,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -173,7 +163,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://delete.sitec.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -186,7 +175,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -199,7 +187,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -212,7 +199,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -229,7 +215,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -240,7 +225,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -251,7 +235,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -262,7 +245,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -273,7 +255,6 @@
"sourceOrigin": "https://donotdeletesitec.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -288,7 +269,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -302,7 +282,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -315,7 +294,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -335,7 +313,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.asite.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -358,7 +335,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -375,7 +351,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -386,7 +361,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -397,7 +371,6 @@
"sourceOrigin": "https://donotdeletesitec.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain_preserve.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain_preserve.json
index 0dae20dcb3..8779a4cdf7 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain_preserve.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_multiple_domain_preserve.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -64,7 +60,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -84,7 +79,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -104,7 +98,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.asite.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -124,7 +117,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -147,7 +139,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -160,7 +151,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -173,7 +163,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://delete.sitec.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -186,7 +175,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -199,7 +187,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -212,7 +199,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -225,7 +211,6 @@
"id": "E7",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.sitea.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -242,7 +227,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -253,7 +237,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -264,7 +247,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -275,7 +257,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -286,7 +267,6 @@
"sourceOrigin": "https://donotdeletesitec.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -297,7 +277,6 @@
"sourceOrigin": "https://a.sitec.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://b.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -312,7 +291,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -326,7 +304,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -340,7 +317,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -353,7 +329,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -373,7 +348,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -393,7 +367,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -416,7 +389,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -429,7 +401,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -442,7 +413,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://delete.sitec.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -455,7 +425,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -468,7 +437,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -481,7 +449,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -498,7 +465,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -509,7 +475,6 @@
"sourceOrigin": "https://a.sitec.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://b.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_nor_range.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_nor_range.json
index 3d389ea4fe..8b72ad2ff4 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_nor_range.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_no_origin_nor_range.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -53,7 +50,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -74,7 +70,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site3.toBeDeletedBecauseOfSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -87,7 +82,6 @@
"id": "E2",
"sourceId": 2,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -104,7 +98,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant.toBeDeleted"
@@ -115,7 +108,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant2"
@@ -130,7 +122,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -143,7 +134,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -164,7 +154,6 @@
"id": "E2",
"sourceId": 2,
"attributionDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -181,7 +170,6 @@
"sourceOrigin": "android-app://com.site1",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant2"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain.json
index df0359e3c1..fe3334db78 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -65,7 +61,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite1.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -79,7 +74,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -93,7 +87,6 @@
"sourceType": "navigation",
"publisher": "https://somedeletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -106,7 +99,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -126,7 +118,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -146,7 +137,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -166,7 +156,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -186,7 +175,6 @@
{
"id": "T5",
"attributionDestination": "https://deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -206,7 +194,6 @@
{
"id": "T6",
"attributionDestination": "https://deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -229,7 +216,6 @@
"id": "E1",
"sourceId": 2,
"attributionDestination": "https://abc.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -242,7 +228,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -255,7 +240,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -268,7 +252,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -281,7 +264,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -294,7 +276,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -307,7 +288,6 @@
"id": "E7",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -320,7 +300,6 @@
"id": "E8",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -337,7 +316,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -348,7 +326,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -359,7 +336,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -370,7 +346,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -381,7 +356,6 @@
"sourceOrigin": "https://site.com",
"destinationSite": "https://deletesite2.com",
"destinationOrigin": "https://abc.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -392,7 +366,6 @@
"sourceOrigin": "https://abc.deletesite1.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -407,7 +380,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -421,7 +393,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -435,7 +406,6 @@
"sourceType": "navigation",
"publisher": "https://somedeletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -448,7 +418,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -468,7 +437,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -491,7 +459,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -504,7 +471,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -521,7 +487,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -532,7 +497,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_exclude_rate_limit.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_exclude_rate_limit.json
index 64b6d0036b..cf0f9fd1f9 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_exclude_rate_limit.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_exclude_rate_limit.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -65,7 +61,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite1.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -79,7 +74,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite2.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -93,7 +87,6 @@
"sourceType": "navigation",
"publisher": "https://somedeletesite2.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -106,7 +99,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -126,7 +118,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -146,7 +137,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -166,7 +156,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -186,7 +175,6 @@
{
"id": "T5",
"attributionDestination": "https://deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -206,7 +194,6 @@
{
"id": "T6",
"attributionDestination": "https://deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -229,7 +216,6 @@
"id": "E1",
"sourceId": 2,
"attributionDestination": "https://abc.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -242,7 +228,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -255,7 +240,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -268,7 +252,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -281,7 +264,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -294,7 +276,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -307,7 +288,6 @@
"id": "E7",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -320,7 +300,6 @@
"id": "E8",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -337,7 +316,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -348,7 +326,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -359,7 +336,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -370,7 +346,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -381,7 +356,6 @@
"sourceOrigin": "https://site.com",
"destinationSite": "https://deletesite2.com",
"destinationOrigin": "https://abc.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -392,7 +366,6 @@
"sourceOrigin": "https://abc.deletesite1.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -407,7 +380,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -421,7 +393,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -435,7 +406,6 @@
"sourceType": "navigation",
"publisher": "https://somedeletesite2.com",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -448,7 +418,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -468,7 +437,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -491,7 +459,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -504,7 +471,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -521,7 +487,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -532,7 +497,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -543,7 +507,6 @@
"sourceOrigin": "https://site3.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -554,7 +517,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -565,7 +527,6 @@
"sourceOrigin": "https://site.com",
"destinationSite": "https://deletesite2.com",
"destinationOrigin": "https://abc.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -576,7 +537,6 @@
"sourceOrigin": "https://abc.deletesite1.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_preserve.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_preserve.json
index 15b30cf96a..b195522c2f 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_preserve.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_and_domain_preserve.json
@@ -9,7 +9,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -23,7 +22,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -37,7 +35,6 @@
"sourceType": "navigation",
"publisher": "https://siteNotMatch.site3.com",
"appDestination": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -51,7 +48,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -65,7 +61,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite1.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -79,7 +74,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -93,7 +87,6 @@
"sourceType": "navigation",
"publisher": "https://somedeletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -106,7 +99,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -126,7 +118,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -146,7 +137,6 @@
{
"id": "T3",
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -166,7 +156,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -186,7 +175,6 @@
{
"id": "T5",
"attributionDestination": "https://deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -206,7 +194,6 @@
{
"id": "T6",
"attributionDestination": "https://deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -229,7 +216,6 @@
"id": "E1",
"sourceId": 2,
"attributionDestination": "https://abc.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -242,7 +228,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -255,7 +240,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "https://doNotDelete.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -268,7 +252,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -281,7 +264,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -294,7 +276,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -307,7 +288,6 @@
"id": "E7",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -320,7 +300,6 @@
"id": "E8",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -337,7 +316,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -348,7 +326,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -359,7 +336,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -370,7 +346,6 @@
"sourceOrigin": "https://deleteCandidate2.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -381,7 +356,6 @@
"sourceOrigin": "https://site.com",
"destinationSite": "https://deletesite2.com",
"destinationOrigin": "https://abc.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -392,7 +366,6 @@
"sourceOrigin": "https://abc.deletesite1.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -403,7 +376,6 @@
"sourceOrigin": "https://site1.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -418,7 +390,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -432,7 +403,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate1.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -446,7 +416,6 @@
"sourceType": "navigation",
"publisher": "https://deleteCandidate2.site.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -460,7 +429,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite1.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -474,7 +442,6 @@
"sourceType": "navigation",
"publisher": "https://abc.deletesite2.com",
"appDestination": "android-app://com.app2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -487,7 +454,6 @@
{
"id": "T1",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -507,7 +473,6 @@
{
"id": "T2",
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -527,7 +492,6 @@
{
"id": "T4",
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -547,7 +511,6 @@
{
"id": "T5",
"attributionDestination": "https://deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -567,7 +530,6 @@
{
"id": "T6",
"attributionDestination": "https://deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -590,7 +552,6 @@
"id": "E1",
"sourceId": 2,
"attributionDestination": "https://abc.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -603,7 +564,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -616,7 +576,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate1.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -629,7 +588,6 @@
"id": "E6",
"sourceId": 2,
"attributionDestination": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -642,7 +600,6 @@
"id": "E7",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite1.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -655,7 +612,6 @@
"id": "E8",
"sourceId": 2,
"attributionDestination": "https://qwe.deletesite2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -672,7 +628,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site2.com",
"destinationOrigin": "https://site2.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -683,7 +638,6 @@
"sourceOrigin": "https://deleteCandidate1.site.com",
"destinationSite": "https://site.com",
"destinationOrigin": "https://deleteCandidate2.site.com",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_but_no_range.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_but_no_range.json
index 7feb95a953..b08551d700 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_but_no_range.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_origin_but_no_range.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.toBeDeleted",
"appDestination": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.doNotDelete",
"appDestination": "android-app://com.site1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site.toBeDeleted",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -53,7 +50,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -74,7 +70,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -87,7 +82,6 @@
"id": "E2",
"sourceId": 2,
"attributionDestination": "android-app://com.site.toBeDeleted",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -100,7 +94,6 @@
"id": "E3",
"sourceId": 3,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -117,7 +110,6 @@
"sourceOrigin": "android-app://com.site.toBeDeleted",
"destinationSite": "android-app://com.site3",
"destinationOrigin": "android-app://com.site3",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -128,7 +120,6 @@
"sourceOrigin": "android-app://com.site2",
"destinationSite": "android-app://com.site.toBeDeleted",
"destinationOrigin": "android-app://com.site.toBeDeleted",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -139,7 +130,6 @@
"sourceOrigin": "android-app://com.site1.doNotDelete",
"destinationSite": "android-app://com.site2.doNotDelete",
"destinationOrigin": "android-app://com.site2.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -154,7 +144,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.doNotDelete",
"appDestination": "android-app://com.site1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 8640000001,
"expiryTime": 8640000030,
@@ -167,7 +156,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"status": 0,
"triggerTime": 8640000002,
@@ -188,7 +176,6 @@
"id": "E3",
"sourceId": 3,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 8640000002,
@@ -205,7 +192,6 @@
"sourceOrigin": "android-app://com.site1.doNotDelete",
"destinationSite": "android-app://com.site2.doNotDelete",
"destinationOrigin": "android-app://com.site2.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 10,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_and_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_and_origin.json
index dcd6556740..80c7383021 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_and_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_and_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -36,7 +34,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -49,7 +46,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -69,7 +65,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -89,7 +84,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -112,7 +106,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -125,7 +118,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -138,7 +130,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -151,7 +142,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -164,7 +154,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -181,7 +170,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -192,7 +180,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -203,7 +190,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -218,7 +204,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -232,7 +217,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -245,7 +229,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -265,7 +248,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -288,7 +270,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -301,7 +282,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -318,7 +298,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -329,7 +308,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_but_no_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_but_no_origin.json
index 1d16ddee75..7e651ffd45 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_but_no_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_but_no_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733601,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site1.triggerTimeInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -55,7 +52,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -78,7 +74,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733601,
@@ -91,7 +86,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -104,7 +98,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -121,7 +114,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733601,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -132,7 +124,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -147,7 +138,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -160,7 +150,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -183,7 +172,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -200,7 +188,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_and_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_and_origin.json
index 69d068775e..3ab4b09a63 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_and_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_and_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733602,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -36,7 +34,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733602,
"expiryTime": 1648665733611,
@@ -49,7 +46,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -69,7 +65,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -89,7 +84,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -112,7 +106,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733602,
@@ -125,7 +118,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -138,7 +130,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -151,7 +142,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733602,
@@ -164,7 +154,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -181,7 +170,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733602,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -192,7 +180,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -203,7 +190,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733602,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -218,7 +204,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -232,7 +217,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733602,
"expiryTime": 1648665733611,
@@ -245,7 +229,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -265,7 +248,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -288,7 +270,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -301,7 +282,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -318,7 +298,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -329,7 +308,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733602,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_no_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_no_origin.json
index 625ebae0ba..708db5af93 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_no_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_ending_edge_no_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733602,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site1.triggerTimeInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -55,7 +52,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -78,7 +74,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733602,
@@ -91,7 +86,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -104,7 +98,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -121,7 +114,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733602,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -132,7 +124,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -147,7 +138,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -160,7 +150,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -183,7 +172,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -200,7 +188,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_and_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_and_origin.json
index bdc53ea2d2..4fbdc711cd 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_and_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_and_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -36,7 +34,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -49,7 +46,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -69,7 +65,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -89,7 +84,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -112,7 +106,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -125,7 +118,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -138,7 +130,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -151,7 +142,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -164,7 +154,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -181,7 +170,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -192,7 +180,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -203,7 +190,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -218,7 +204,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -232,7 +217,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -245,7 +229,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -265,7 +248,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -288,7 +270,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -301,7 +282,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -318,7 +298,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -329,7 +308,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_no_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_no_origin.json
index 89676fc5c2..d162d2fed1 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_no_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_range_on_starting_edge_no_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site1.triggerTimeInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -55,7 +52,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -78,7 +74,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -91,7 +86,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -104,7 +98,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -121,7 +114,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -132,7 +124,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -147,7 +138,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -160,7 +150,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -183,7 +172,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -200,7 +188,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_and_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_and_origin.json
index def027f057..91f25ba4ee 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_and_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_and_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -36,7 +34,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -49,7 +46,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -69,7 +65,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -89,7 +84,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -112,7 +106,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -125,7 +118,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site.notInRangeButDeleteDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -138,7 +130,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -151,7 +142,6 @@
"id": "E4",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -164,7 +154,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -181,7 +170,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -192,7 +180,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -203,7 +190,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -218,7 +204,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site.deleteCandidate",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -232,7 +217,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site3.siteNotMatch",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -245,7 +229,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -265,7 +248,6 @@
{
"id": "T3",
"attributionDestination": "android-app://com.site.doNotDeleteButInRange",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -288,7 +270,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site.doNotDelete",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -301,7 +282,6 @@
"id": "E5",
"sourceId": 2,
"attributionDestination": "android-app://com.site.deleteCandidate",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -318,7 +298,6 @@
"sourceOrigin": "android-app://com.site.deleteCandidate",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -329,7 +308,6 @@
"sourceOrigin": "android-app://com.site3",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_no_origin.json b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_no_origin.json
index 648156f01b..a85586a9aa 100644
--- a/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_no_origin.json
+++ b/adservices/tests/unittest/service-core/assets/msmt_browser_deletion_tests/with_start_equals_end_no_origin.json
@@ -8,7 +8,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733600,
"expiryTime": 1648665733611,
@@ -22,7 +21,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -35,7 +33,6 @@
{
"id": "T1",
"attributionDestination": "android-app://com.site1.triggerTimeInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -55,7 +52,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -78,7 +74,6 @@
"id": "E1",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733600,
@@ -91,7 +86,6 @@
"id": "E2",
"sourceId": 1,
"attributionDestination": "android-app://com.site2.toBeDeletedDueToSourceId1",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -104,7 +98,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -121,7 +114,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733600,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -132,7 +124,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
@@ -147,7 +138,6 @@
"sourceType": "navigation",
"publisher": "android-app://com.site1.eventTimeNotInRangeForDeletion",
"appDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"eventTime": 1648665733605,
"expiryTime": 1648665733615,
@@ -160,7 +150,6 @@
{
"id": "T2",
"attributionDestination": "android-app://com.site2.triggerTimeNotInRangeForDeletion",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"priority": 101,
"status": 0,
@@ -183,7 +172,6 @@
"id": "E3",
"sourceId": 2,
"attributionDestination": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerData": 2,
"triggerTime": 1648665733605,
@@ -200,7 +188,6 @@
"sourceOrigin": "android-app://com.site1.triggerTimeNotInRangeForDeletion",
"destinationSite": "android-app://com.site2",
"destinationOrigin": "android-app://com.site2",
- "adTechDomain": "https://ad-tech.example.com",
"enrollmentId": "enrollment-id",
"triggerTime": 1648665733605,
"registrant": "android-app://com.registrant.deleteCandidate"
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/DbHelperTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/DbHelperTest.java
index 16166d77d6..9fa53cda52 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/DbHelperTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/DbHelperTest.java
@@ -43,19 +43,19 @@ public class DbHelperTest {
assertTrue(doesTableExistAndColumnCountMatch(db, "topics_returned_topics", 7));
assertTrue(doesTableExistAndColumnCountMatch(db, "topics_usage_history", 3));
assertTrue(doesTableExistAndColumnCountMatch(db, "topics_app_usage_history", 3));
- assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_source", 23));
- assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_trigger", 13));
+ assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_source", 22));
+ assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_trigger", 12));
assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_async_registration_contract", 13));
- assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_event_report", 13));
- assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_attribution", 9));
- assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_aggregate_report", 10));
+ assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_event_report", 12));
+ assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_attribution", 8));
+ assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_aggregate_report", 9));
assertTrue(doesTableExistAndColumnCountMatch(db, "msmt_aggregate_encryption_key", 4));
assertTrue(doesTableExistAndColumnCountMatch(db, "enrollment_data", 8));
- assertTrue(doesIndexExist(db, "idx_msmt_source_ad_atd_ei_et"));
+ assertTrue(doesIndexExist(db, "idx_msmt_source_ad_ei_et"));
assertTrue(doesIndexExist(db, "idx_msmt_source_p_ad_wd_s_et"));
- assertTrue(doesIndexExist(db, "idx_msmt_trigger_ad_atd_ei_tt"));
+ assertTrue(doesIndexExist(db, "idx_msmt_trigger_ad_ei_tt"));
assertTrue(doesIndexExist(db, "idx_msmt_source_et"));
assertTrue(doesIndexExist(db, "idx_msmt_trigger_tt"));
- assertTrue(doesIndexExist(db, "idx_msmt_attribution_ss_so_ds_do_atd_ei_tt"));
+ assertTrue(doesIndexExist(db, "idx_msmt_attribution_ss_so_ds_do_ei_tt"));
}
}
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
index 83574b992f..55c5fc8f94 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
@@ -242,8 +242,6 @@ public abstract class AbstractDbIntegrationTest {
values.put(
MeasurementTables.SourceContract.APP_DESTINATION,
source.getAppDestination().toString());
- values.put(MeasurementTables.SourceContract.AD_TECH_DOMAIN,
- source.getAdTechDomain().toString());
values.put(MeasurementTables.SourceContract.ENROLLMENT_ID, source.getEnrollmentId());
values.put(MeasurementTables.SourceContract.STATUS, source.getStatus());
values.put(MeasurementTables.SourceContract.EVENT_TIME, source.getEventTime());
@@ -275,8 +273,6 @@ public abstract class AbstractDbIntegrationTest {
trigger.getAttributionDestination().toString());
values.put(MeasurementTables.TriggerContract.DESTINATION_TYPE,
trigger.getDestinationType());
- values.put(MeasurementTables.TriggerContract.AD_TECH_DOMAIN,
- trigger.getAdTechDomain().toString());
values.put(MeasurementTables.TriggerContract.ENROLLMENT_ID, trigger.getEnrollmentId());
values.put(MeasurementTables.TriggerContract.STATUS, trigger.getStatus());
values.put(MeasurementTables.TriggerContract.TRIGGER_TIME, trigger.getTriggerTime());
@@ -298,8 +294,6 @@ public abstract class AbstractDbIntegrationTest {
ContentValues values = new ContentValues();
values.put(MeasurementTables.EventReportContract.ID, report.getId());
values.put(MeasurementTables.EventReportContract.SOURCE_ID, report.getSourceId());
- values.put(MeasurementTables.EventReportContract.AD_TECH_DOMAIN,
- report.getAdTechDomain().toString());
values.put(MeasurementTables.EventReportContract.ENROLLMENT_ID, report.getEnrollmentId());
values.put(MeasurementTables.EventReportContract.ATTRIBUTION_DESTINATION,
report.getAttributionDestination().toString());
@@ -335,8 +329,6 @@ public abstract class AbstractDbIntegrationTest {
attribution.getDestinationSite());
values.put(MeasurementTables.AttributionContract.DESTINATION_ORIGIN,
attribution.getDestinationOrigin());
- values.put(MeasurementTables.AttributionContract.AD_TECH_DOMAIN,
- attribution.getAdTechDomain());
values.put(MeasurementTables.AttributionContract.ENROLLMENT_ID,
attribution.getEnrollmentId());
values.put(MeasurementTables.AttributionContract.TRIGGER_TIME,
@@ -367,9 +359,6 @@ public abstract class AbstractDbIntegrationTest {
MeasurementTables.AggregateReport.SCHEDULED_REPORT_TIME,
aggregateReport.getScheduledReportTime());
values.put(
- MeasurementTables.AggregateReport.AD_TECH_DOMAIN,
- aggregateReport.getAdTechDomain().toString());
- values.put(
MeasurementTables.AggregateReport.ENROLLMENT_ID,
aggregateReport.getEnrollmentId());
values.put(
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DbState.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DbState.java
index 26a70861a6..2862313521 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DbState.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DbState.java
@@ -226,7 +226,6 @@ public class DbState {
.setPublisher(Uri.parse(sJSON.getString("publisher")))
.setPublisherType(sJSON.optInt("publisherType"))
.setAppDestination(Uri.parse(sJSON.getString("appDestination")))
- .setAdTechDomain(Uri.parse(sJSON.getString("adTechDomain")))
.setEnrollmentId(sJSON.getString("enrollmentId"))
.setEventTime(sJSON.getLong("eventTime"))
.setExpiryTime(sJSON.getLong("expiryTime"))
@@ -248,7 +247,6 @@ public class DbState {
.setId(tJSON.getString("id"))
.setAttributionDestination(Uri.parse(tJSON.getString("attributionDestination")))
.setDestinationType(tJSON.optInt("destinationType"))
- .setAdTechDomain(Uri.parse(tJSON.getString("adTechDomain")))
.setEnrollmentId(tJSON.getString("enrollmentId"))
.setEventTriggers(tJSON.getString("eventTriggers"))
.setTriggerTime(tJSON.getLong("triggerTime"))
@@ -263,7 +261,6 @@ public class DbState {
.setId(rJSON.getString("id"))
.setSourceId(rJSON.getLong("sourceId"))
.setAttributionDestination(Uri.parse(rJSON.getString("attributionDestination")))
- .setAdTechDomain(Uri.parse(rJSON.getString("adTechDomain")))
.setEnrollmentId(rJSON.getString("enrollmentId"))
.setTriggerData(rJSON.getLong("triggerData"))
.setTriggerTime(rJSON.getLong("triggerTime"))
@@ -285,7 +282,6 @@ public class DbState {
.setSourceOrigin(attrJSON.getString("sourceOrigin"))
.setDestinationSite(attrJSON.getString("destinationSite"))
.setDestinationOrigin(attrJSON.getString("destinationOrigin"))
- .setAdTechDomain(attrJSON.getString("adTechDomain"))
.setEnrollmentId(attrJSON.getString("enrollmentId"))
.setTriggerTime(attrJSON.getLong("triggerTime"))
.setRegistrant(attrJSON.getString("registrant"))
@@ -323,10 +319,6 @@ public class DbState {
cursor.getString(
cursor.getColumnIndex(
MeasurementTables.AttributionContract.DESTINATION_ORIGIN)))
- .setAdTechDomain(
- cursor.getString(
- cursor.getColumnIndex(
- MeasurementTables.AttributionContract.AD_TECH_DOMAIN)))
.setEnrollmentId(
cursor.getString(
cursor.getColumnIndex(
@@ -350,7 +342,6 @@ public class DbState {
.setAttributionDestination(Uri.parse(rJSON.getString("attributionDestination")))
.setSourceRegistrationTime(rJSON.getLong("sourceRegistrationTime"))
.setScheduledReportTime(rJSON.getLong("scheduledReportTime"))
- .setAdTechDomain(Uri.parse(rJSON.getString("adTechDomain")))
.setEnrollmentId(rJSON.getString("enrollmentId"))
.setDebugCleartextPayload(rJSON.getString("debugCleartextPayload"))
.setStatus(rJSON.getInt("status"))
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DeleteExpiredDynamicIntegrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DeleteExpiredDynamicIntegrationTest.java
index 927d1751bc..aa7fd7ce53 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DeleteExpiredDynamicIntegrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/DeleteExpiredDynamicIntegrationTest.java
@@ -50,7 +50,7 @@ public class DeleteExpiredDynamicIntegrationTest extends AbstractDbIntegrationTe
Source source =
new Source.Builder()
- .setAdTechDomain(Uri.parse("https://example.com"))
+ .setEnrollmentId("enrollment-id")
.setAppDestination(Uri.parse("android-app://com.example.app/aD"))
.setPublisher(Uri.parse("https://example.com/aS"))
.setId("non-expired")
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/MeasurementDaoTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/MeasurementDaoTest.java
index a534df6681..95597a773e 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/MeasurementDaoTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/MeasurementDaoTest.java
@@ -104,7 +104,6 @@ public class MeasurementDaoTest {
assertEquals(validSource.getPublisher(), source.getPublisher());
assertEquals(validSource.getAppDestination(), source.getAppDestination());
assertEquals(validSource.getWebDestination(), source.getWebDestination());
- assertEquals(validSource.getAdTechDomain(), source.getAdTechDomain());
assertEquals(validSource.getEnrollmentId(), source.getEnrollmentId());
assertEquals(validSource.getRegistrant(), source.getRegistrant());
assertEquals(validSource.getEventTime(), source.getEventTime());
@@ -139,7 +138,6 @@ public class MeasurementDaoTest {
assertEquals(
validTrigger.getAttributionDestination(), trigger.getAttributionDestination());
assertEquals(validTrigger.getDestinationType(), trigger.getDestinationType());
- assertEquals(validTrigger.getAdTechDomain(), trigger.getAdTechDomain());
assertEquals(validTrigger.getEnrollmentId(), trigger.getEnrollmentId());
assertEquals(validTrigger.getRegistrant(), trigger.getRegistrant());
assertEquals(validTrigger.getTriggerTime(), trigger.getTriggerTime());
@@ -184,22 +182,22 @@ public class MeasurementDaoTest {
}
@Test
- public void testCountDistinctAdTechsPerPublisherXDestinationInAttribution_appDestination() {
+ public void testCountDistinctEnrollmentsPerPublisherXDestinationInAttribution_appDestination() {
Uri sourceSite = Uri.parse("android-app://publisher.app");
Uri webDestination = Uri.parse("https://web-destination.com");
Uri appDestination = Uri.parse("android-app://destination.app");
String registrant = "android-app://registrant.app";
List<Attribution> attributionsWithAppDestinations1 =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
4, appDestination, 5000000000L, sourceSite, registrant);
List<Attribution> attributionsWithAppDestinations2 =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
2, appDestination, 5000000000L, sourceSite, registrant);
List<Attribution> attributionsWithWebDestinations =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
2, webDestination, 5500000000L, sourceSite, registrant);
List<Attribution> attributionsOutOfWindow =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
10, appDestination, 50000000000L, sourceSite, registrant);
for (Attribution attribution : attributionsWithAppDestinations1) {
insertAttribution(attribution);
@@ -214,33 +212,33 @@ public class MeasurementDaoTest {
insertAttribution(attribution);
}
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
- Uri excludedAdTech = Uri.parse("https://ad-tech-domain-0.com");
+ String excludedEnrollmentId = "enrollment-id-0";
datastoreManager.runInTransaction(
measurementDao -> {
assertEquals(Integer.valueOf(3), measurementDao
- .countDistinctAdTechsPerPublisherXDestinationInAttribution(
- sourceSite, appDestination, excludedAdTech,
+ .countDistinctEnrollmentsPerPublisherXDestinationInAttribution(
+ sourceSite, appDestination, excludedEnrollmentId,
4000000000L, 6000000000L));
});
}
@Test
- public void testCountDistinctAdTechsPerPublisherXDestinationInAttribution_webDestination() {
+ public void testCountDistinctEnrollmentsPerPublisherXDestinationInAttribution_webDestination() {
Uri sourceSite = Uri.parse("android-app://publisher.app");
Uri webDestination = Uri.parse("https://web-destination.com");
Uri appDestination = Uri.parse("android-app://destination.app");
String registrant = "android-app://registrant.app";
List<Attribution> attributionsWithAppDestinations =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
2, appDestination, 5000000000L, sourceSite, registrant);
List<Attribution> attributionsWithWebDestinations1 =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
4, webDestination, 5000000000L, sourceSite, registrant);
List<Attribution> attributionsWithWebDestinations2 =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
2, webDestination, 5500000000L, sourceSite, registrant);
List<Attribution> attributionsOutOfWindow =
- getAttributionsWithDifferentAdTechDomains(
+ getAttributionsWithDifferentEnrollments(
10, webDestination, 50000000000L, sourceSite, registrant);
for (Attribution attribution : attributionsWithAppDestinations) {
insertAttribution(attribution);
@@ -255,12 +253,12 @@ public class MeasurementDaoTest {
insertAttribution(attribution);
}
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
- Uri excludedAdTech = Uri.parse("https://ad-tech-domain-3.com");
+ String excludedEnrollmentId = "enrollment-id-3";
datastoreManager.runInTransaction(
measurementDao -> {
assertEquals(Integer.valueOf(3), measurementDao
- .countDistinctAdTechsPerPublisherXDestinationInAttribution(
- sourceSite, webDestination, excludedAdTech,
+ .countDistinctEnrollmentsPerPublisherXDestinationInAttribution(
+ sourceSite, webDestination, excludedEnrollmentId,
4000000000L, 6000000000L));
});
}
@@ -271,23 +269,23 @@ public class MeasurementDaoTest {
List<Source> activeSourcesWithAppAndWebDestinations =
getSourcesWithDifferentDestinations(
4, true, true, 4500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
getSourcesWithDifferentDestinations(
2, true, false, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
getSourcesWithDifferentDestinations(
2, false, true, 5500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
getSourcesWithDifferentDestinations(
10, true, true, 50000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> ignoredSources =
getSourcesWithDifferentDestinations(
10, true, true, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.IGNORED);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
insertSource(source);
}
@@ -310,9 +308,9 @@ public class MeasurementDaoTest {
assertEquals(
Integer.valueOf(3),
measurementDao
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher, EventSurfaceType.APP,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID,
excludedDestination, EventSurfaceType.WEB,
4000000000L, 6000000000L));
});
@@ -320,28 +318,28 @@ public class MeasurementDaoTest {
// (Testing countDistinctDestinationsPerPublisherInActiveSource)
@Test
- public void testCountDistinctDestinations_appPublisher_adTechMismatch() {
+ public void testCountDistinctDestinations_appPublisher_enrollmentMismatch() {
Uri publisher = Uri.parse("android-app://publisher.app");
List<Source> activeSourcesWithAppAndWebDestinations =
getSourcesWithDifferentDestinations(
4, true, true, 4500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
getSourcesWithDifferentDestinations(
2, true, false, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
getSourcesWithDifferentDestinations(
2, false, true, 5500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
getSourcesWithDifferentDestinations(
10, true, true, 50000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> ignoredSources =
getSourcesWithDifferentDestinations(
10, true, true, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.IGNORED);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
insertSource(source);
}
@@ -364,11 +362,10 @@ public class MeasurementDaoTest {
assertEquals(
Integer.valueOf(0),
measurementDao
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher, EventSurfaceType.APP,
- Uri.parse("https://unmatched-ad-tech.com"),
- excludedDestination, EventSurfaceType.WEB,
- 4000000000L, 6000000000L));
+ "unmatched-enrollment-id", excludedDestination,
+ EventSurfaceType.WEB, 4000000000L, 6000000000L));
});
}
@@ -378,23 +375,23 @@ public class MeasurementDaoTest {
List<Source> activeSourcesWithAppAndWebDestinations =
getSourcesWithDifferentDestinations(
4, true, true, 4500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
getSourcesWithDifferentDestinations(
2, true, false, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
getSourcesWithDifferentDestinations(
2, false, true, 5500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
getSourcesWithDifferentDestinations(
10, true, true, 50000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> ignoredSources =
getSourcesWithDifferentDestinations(
10, true, true, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.IGNORED);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
insertSource(source);
}
@@ -417,15 +414,15 @@ public class MeasurementDaoTest {
assertEquals(
Integer.valueOf(3),
measurementDao
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher, EventSurfaceType.WEB,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID,
excludedDestination, EventSurfaceType.WEB,
4000000000L, 6000000000L));
});
}
- // (Testing countDistinctDestinationsPerPublisherXAdTechInActiveSource)
+ // (Testing countDistinctDestinationsPerPublisherXEnrollmentInActiveSource)
@Test
public void testCountDistinctDestinations_webPublisher_doesNotMatchDomainAsSuffix() {
Uri publisher = Uri.parse("https://publisher.com");
@@ -433,23 +430,23 @@ public class MeasurementDaoTest {
List<Source> activeSourcesWithAppAndWebDestinations =
getSourcesWithDifferentDestinations(
4, true, true, 4500000000L, publisherAsSuffix,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
getSourcesWithDifferentDestinations(
2, true, false, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
getSourcesWithDifferentDestinations(
2, false, true, 5500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
getSourcesWithDifferentDestinations(
10, true, true, 50000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> ignoredSources =
getSourcesWithDifferentDestinations(
10, true, true, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.IGNORED);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
insertSource(source);
}
@@ -472,15 +469,15 @@ public class MeasurementDaoTest {
assertEquals(
Integer.valueOf(2),
measurementDao
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher, EventSurfaceType.WEB,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID,
excludedDestination, EventSurfaceType.WEB,
4000000000L, 6000000000L));
});
}
- // (Testing countDistinctDestinationsPerPublisherXAdTechInActiveSource)
+ // (Testing countDistinctDestinationsPerPublisherXEnrollmentInActiveSource)
@Test
public void testCountDistinctDestinations_webPublisher_doesNotMatchDifferentScheme() {
Uri publisher = Uri.parse("https://publisher.com");
@@ -488,23 +485,23 @@ public class MeasurementDaoTest {
List<Source> activeSourcesWithAppAndWebDestinations =
getSourcesWithDifferentDestinations(
4, true, true, 4500000000L, publisherWithDifferentScheme,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
getSourcesWithDifferentDestinations(
2, true, false, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
getSourcesWithDifferentDestinations(
2, false, true, 5500000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
getSourcesWithDifferentDestinations(
10, true, true, 50000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.ACTIVE);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.ACTIVE);
List<Source> ignoredSources =
getSourcesWithDifferentDestinations(
10, true, true, 5000000000L, publisher,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN, Source.Status.IGNORED);
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID, Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
insertSource(source);
}
@@ -527,35 +524,35 @@ public class MeasurementDaoTest {
assertEquals(
Integer.valueOf(2),
measurementDao
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
publisher, EventSurfaceType.WEB,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
+ SourceFixture.ValidSourceParams.ENROLLMENT_ID,
excludedDestination, EventSurfaceType.WEB,
4000000000L, 6000000000L));
});
}
@Test
- public void testCountDistinctAdTechsPerPublisherXDestinationInSource_appDestination() {
+ public void testCountDistinctEnrollmentsPerPublisherXDestinationInSource_appDestination() {
Uri publisher = Uri.parse("android-app://publisher.app");
Uri webDestination = Uri.parse("https://web-destination.com");
Uri appDestination = Uri.parse("android-app://destination.app");
List<Source> activeSourcesWithAppAndWebDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, appDestination, webDestination, 4500000000L, publisher,
Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, appDestination, null, 5000000000L, publisher, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, null, webDestination, 5500000000L, publisher, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
10, appDestination, webDestination, 50000000000L, publisher,
Source.Status.ACTIVE);
List<Source> ignoredSources =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
3, appDestination, webDestination, 5000000000L, publisher,
Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
@@ -574,38 +571,38 @@ public class MeasurementDaoTest {
insertSource(source);
}
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
- Uri excludedAdTech = Uri.parse("https://ad-tech-domain-1.com");
+ String excludedEnrollmentId = "enrollment-id-1";
datastoreManager.runInTransaction(
measurementDao -> {
assertEquals(
Integer.valueOf(2),
- measurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ measurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
publisher, EventSurfaceType.APP, appDestination,
- excludedAdTech, 4000000000L, 6000000000L));
+ excludedEnrollmentId, 4000000000L, 6000000000L));
});
}
@Test
- public void testCountDistinctAdTechsPerPublisherXDestinationInSource_webDestination() {
+ public void testCountDistinctEnrollmentsPerPublisherXDestinationInSource_webDestination() {
Uri publisher = Uri.parse("android-app://publisher.app");
Uri webDestination = Uri.parse("https://web-destination.com");
Uri appDestination = Uri.parse("android-app://destination.app");
List<Source> activeSourcesWithAppAndWebDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, appDestination, webDestination, 4500000000L, publisher,
Source.Status.ACTIVE);
List<Source> activeSourcesWithAppDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, appDestination, null, 5000000000L, publisher, Source.Status.ACTIVE);
List<Source> activeSourcesWithWebDestinations =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
2, null, webDestination, 5500000000L, publisher, Source.Status.ACTIVE);
List<Source> activeSourcesOutOfWindow =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
10, appDestination, webDestination, 50000000000L, publisher,
Source.Status.ACTIVE);
List<Source> ignoredSources =
- getSourcesWithDifferentAdTechDomains(
+ getSourcesWithDifferentEnrollments(
3, appDestination, webDestination, 5000000000L, publisher,
Source.Status.IGNORED);
for (Source source : activeSourcesWithAppAndWebDestinations) {
@@ -624,14 +621,14 @@ public class MeasurementDaoTest {
insertSource(source);
}
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
- Uri excludedAdTech = Uri.parse("https://ad-tech-domain-22.com");
+ String excludedEnrollmentId = "enrollment-id-22";
datastoreManager.runInTransaction(
measurementDao -> {
assertEquals(
Integer.valueOf(3),
- measurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ measurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
publisher, EventSurfaceType.APP, appDestination,
- excludedAdTech, 4000000000L, 6000000000L));
+ excludedEnrollmentId, 4000000000L, 6000000000L));
});
}
@@ -913,7 +910,7 @@ public class MeasurementDaoTest {
public void testGetMatchingActiveSources() {
SQLiteDatabase db = DbHelper.getInstance(sContext).safeGetWritableDatabase();
Objects.requireNonNull(db);
- Uri adTechDomain = Uri.parse("https://www.example.xyz");
+ String enrollmentId = "enrollment-id";
Uri appDestination = Uri.parse("android-app://com.example.abc");
Uri webDestination = Uri.parse("https://example.com");
Uri webDestinationWithSubdomain = Uri.parse("https://xyz.example.com");
@@ -923,7 +920,7 @@ public class MeasurementDaoTest {
.setEventTime(10)
.setExpiryTime(20)
.setAppDestination(appDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sApp2 =
SourceFixture.getValidSourceBuilder()
@@ -931,7 +928,7 @@ public class MeasurementDaoTest {
.setEventTime(10)
.setExpiryTime(50)
.setAppDestination(appDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sApp3 =
SourceFixture.getValidSourceBuilder()
@@ -939,7 +936,7 @@ public class MeasurementDaoTest {
.setEventTime(20)
.setExpiryTime(50)
.setAppDestination(appDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sApp4 =
SourceFixture.getValidSourceBuilder()
@@ -947,7 +944,7 @@ public class MeasurementDaoTest {
.setEventTime(30)
.setExpiryTime(50)
.setAppDestination(appDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sWeb5 =
SourceFixture.getValidSourceBuilder()
@@ -955,7 +952,7 @@ public class MeasurementDaoTest {
.setEventTime(10)
.setExpiryTime(20)
.setWebDestination(webDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sWeb6 =
SourceFixture.getValidSourceBuilder()
@@ -963,7 +960,7 @@ public class MeasurementDaoTest {
.setEventTime(10)
.setExpiryTime(50)
.setWebDestination(webDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
Source sAppWeb7 =
SourceFixture.getValidSourceBuilder()
@@ -972,7 +969,7 @@ public class MeasurementDaoTest {
.setExpiryTime(20)
.setAppDestination(appDestination)
.setWebDestination(webDestination)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.build();
List<Source> sources = Arrays.asList(sApp1, sApp2, sApp3, sApp4, sWeb5, sWeb6, sAppWeb7);
@@ -997,7 +994,7 @@ public class MeasurementDaoTest {
Trigger trigger1MatchSource1And2 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(12)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(appDestination)
.setDestinationType(EventSurfaceType.APP)
.build();
@@ -1017,7 +1014,7 @@ public class MeasurementDaoTest {
Trigger trigger2MatchSource127 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(20)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(appDestination)
.setDestinationType(EventSurfaceType.APP)
.build();
@@ -1038,7 +1035,7 @@ public class MeasurementDaoTest {
Trigger trigger3MatchSource237 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(21)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(appDestination)
.setDestinationType(EventSurfaceType.APP)
.build();
@@ -1058,7 +1055,7 @@ public class MeasurementDaoTest {
Trigger trigger4MatchSource1And2And3 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(31)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(appDestination)
.setDestinationType(EventSurfaceType.APP)
.build();
@@ -1077,7 +1074,7 @@ public class MeasurementDaoTest {
Trigger trigger5MatchSource567 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(12)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(webDestination)
.setDestinationType(EventSurfaceType.WEB)
.build();
@@ -1095,7 +1092,7 @@ public class MeasurementDaoTest {
Trigger trigger6MatchSource67 =
TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(21)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setAttributionDestination(webDestinationWithSubdomain)
.setDestinationType(EventSurfaceType.WEB)
.build();
@@ -1111,7 +1108,7 @@ public class MeasurementDaoTest {
values.put(SourceContract.STATUS, Source.Status.ACTIVE);
values.put(SourceContract.EVENT_TIME, source.getEventTime());
values.put(SourceContract.EXPIRY_TIME, source.getExpiryTime());
- values.put(SourceContract.AD_TECH_DOMAIN, source.getAdTechDomain().toString());
+ values.put(SourceContract.ENROLLMENT_ID, source.getEnrollmentId());
if (source.getAppDestination() != null) {
values.put(SourceContract.APP_DESTINATION, source.getAppDestination().toString());
}
@@ -1210,7 +1207,7 @@ public class MeasurementDaoTest {
rateLimitValue.put(AttributionContract.DESTINATION_SITE, "destinationSite");
rateLimitValue.put(AttributionContract.TRIGGER_TIME, 5L);
rateLimitValue.put(AttributionContract.REGISTRANT, "registrant");
- rateLimitValue.put(AttributionContract.AD_TECH_DOMAIN, "adTechDomain");
+ rateLimitValue.put(AttributionContract.ENROLLMENT_ID, "enrollmentId");
db.insert(AttributionContract.TABLE, null, rateLimitValue);
@@ -1273,7 +1270,7 @@ public class MeasurementDaoTest {
rateLimitValue.put(AttributionContract.DESTINATION_SITE, "destinationSite");
rateLimitValue.put(AttributionContract.TRIGGER_TIME, 5L);
rateLimitValue.put(AttributionContract.REGISTRANT, "registrant");
- rateLimitValue.put(AttributionContract.AD_TECH_DOMAIN, "adTechDomain");
+ rateLimitValue.put(AttributionContract.ENROLLMENT_ID, "enrollmentId");
db.insert(AttributionContract.TABLE, null, rateLimitValue);
AggregateEncryptionKey key =
@@ -1355,7 +1352,6 @@ public class MeasurementDaoTest {
.build();
Attribution attribution =
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setEnrollmentId(source.getEnrollmentId())
.setDestinationOrigin(source.getWebDestination().toString())
.setDestinationSite(source.getAppDestination().toString())
@@ -1421,14 +1417,14 @@ public class MeasurementDaoTest {
boolean hasWebDestination,
long eventTime,
Uri publisher,
- Uri adTechDomain,
+ String enrollmentId,
@Source.Status int sourceStatus) {
List<Source> sources = new ArrayList<>();
for (int i = 0; i < numSources; i++) {
Source.Builder sourceBuilder = new Source.Builder()
.setEventTime(eventTime)
.setPublisher(publisher)
- .setAdTechDomain(adTechDomain)
+ .setEnrollmentId(enrollmentId)
.setRegistrant(SourceFixture.ValidSourceParams.REGISTRANT)
.setStatus(sourceStatus);
if (hasAppDestination) {
@@ -1444,7 +1440,7 @@ public class MeasurementDaoTest {
return sources;
}
- private static List<Source> getSourcesWithDifferentAdTechDomains(
+ private static List<Source> getSourcesWithDifferentEnrollments(
int numSources,
Uri appDestination,
Uri webDestination,
@@ -1460,14 +1456,13 @@ public class MeasurementDaoTest {
.setStatus(sourceStatus)
.setAppDestination(appDestination)
.setWebDestination(webDestination)
- .setAdTechDomain(Uri.parse(
- "https://ad-tech-domain-" + String.valueOf(i) + ".com"));
+ .setEnrollmentId("enrollment-id-" + i);
sources.add(sourceBuilder.build());
}
return sources;
}
- private static List<Attribution> getAttributionsWithDifferentAdTechDomains(
+ private static List<Attribution> getAttributionsWithDifferentEnrollments(
int numAttributions,
Uri destinationSite,
long triggerTime,
@@ -1482,7 +1477,7 @@ public class MeasurementDaoTest {
.setSourceOrigin(sourceSite.toString())
.setDestinationSite(destinationSite.toString())
.setDestinationOrigin(destinationSite.toString())
- .setAdTechDomain("https://ad-tech-domain-" + i + ".com")
+ .setEnrollmentId("enrollment-id-" + i)
.setRegistrant(registrant);
attributions.add(attributionBuilder.build());
}
@@ -1495,7 +1490,7 @@ public class MeasurementDaoTest {
values.put(AttributionContract.ID, UUID.randomUUID().toString());
values.put(AttributionContract.SOURCE_SITE, attribution.getSourceSite());
values.put(AttributionContract.DESTINATION_SITE, attribution.getDestinationSite());
- values.put(AttributionContract.AD_TECH_DOMAIN, attribution.getAdTechDomain());
+ values.put(AttributionContract.ENROLLMENT_ID, attribution.getEnrollmentId());
values.put(AttributionContract.TRIGGER_TIME, attribution.getTriggerTime());
long row = db.insert("msmt_attribution", null, values);
Assert.assertNotEquals("Attribution insertion failed", -1, row);
@@ -1513,7 +1508,7 @@ public class MeasurementDaoTest {
SourceContract.APP_DESTINATION, getNullableUriString(source.getAppDestination()));
values.put(
SourceContract.WEB_DESTINATION, getNullableUriString(source.getWebDestination()));
- values.put(SourceContract.AD_TECH_DOMAIN, source.getAdTechDomain().toString());
+ values.put(SourceContract.ENROLLMENT_ID, source.getEnrollmentId());
values.put(SourceContract.EVENT_TIME, source.getEventTime());
values.put(SourceContract.EXPIRY_TIME, source.getExpiryTime());
values.put(SourceContract.PRIORITY, source.getPriority());
@@ -1573,7 +1568,7 @@ public class MeasurementDaoTest {
.setId(id)
.setPublisher(Uri.parse("android-app://com.example.sample"))
.setRegistrant(Uri.parse("android-app://com.example.sample"))
- .setAdTechDomain(Uri.parse("https://example.com"))
+ .setEnrollmentId("enrollment-id")
.setExpiryTime(currentTime + TimeUnit.DAYS.toMillis(30))
.setInstallAttributionWindow(TimeUnit.DAYS.toMillis(expiredIAWindow ? 0 : 30))
.setAppDestination(INSTALLED_PACKAGE)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/AttributionTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/AttributionTest.java
index 6ad61845fb..56893ca647 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/AttributionTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/AttributionTest.java
@@ -29,7 +29,6 @@ public class AttributionTest {
private static final String PUBLISHER_ORIGIN = "android-app://com.publisher/abc";
private static final String PUBLISHER_SITE = "android-app://com.publisher";
private static final String REGISTRANT = "android-app://com.registrant";
- private static final String AD_TECH_DOMAIN = "https://com.example";
private static final String ENROLLMENT_ID = "enrollment-id";
private static final long TRIGGER_TIME = 10000L;
private static final String SOME_OTHER_STRING = "some_other";
@@ -52,11 +51,6 @@ public class AttributionTest {
createExampleAttributionBuilder().build());
assertNotEquals(
createExampleAttributionBuilder()
- .setAdTechDomain(SOME_OTHER_STRING)
- .build(),
- createExampleAttributionBuilder().build());
- assertNotEquals(
- createExampleAttributionBuilder()
.setEnrollmentId(SOME_OTHER_STRING)
.build(),
createExampleAttributionBuilder().build());
@@ -100,12 +94,6 @@ public class AttributionTest {
createExampleAttributionBuilder().build().hashCode());
assertNotEquals(
createExampleAttributionBuilder()
- .setAdTechDomain(SOME_OTHER_STRING)
- .build()
- .hashCode(),
- createExampleAttributionBuilder().build().hashCode());
- assertNotEquals(
- createExampleAttributionBuilder()
.setEnrollmentId(SOME_OTHER_STRING)
.build()
.hashCode(),
@@ -160,9 +148,6 @@ public class AttributionTest {
assertEquals(
TRIGGER_TIME, createExampleAttributionBuilder().build().getTriggerTime());
assertEquals(
- AD_TECH_DOMAIN,
- createExampleAttributionBuilder().build().getAdTechDomain());
- assertEquals(
ENROLLMENT_ID,
createExampleAttributionBuilder().build().getEnrollmentId());
}
@@ -177,11 +162,7 @@ public class AttributionTest {
() -> createExampleAttributionBuilder().setRegistrant(null).build());
assertThrows(
IllegalArgumentException.class,
- () -> createExampleAttributionBuilder().setAdTechDomain(null).build());
- // TODO (b/238924528): uncomment when enforcing enrollment
- /*assertThrows(
- IllegalArgumentException.class,
- () -> createExampleAttributionBuilder().setEnrollmentId(null).build());*/
+ () -> createExampleAttributionBuilder().setEnrollmentId(null).build());
assertThrows(
IllegalArgumentException.class,
() -> createExampleAttributionBuilder().setDestinationSite(null).build());
@@ -201,7 +182,6 @@ public class AttributionTest {
.setId(ID)
.setRegistrant(REGISTRANT)
.setTriggerTime(TRIGGER_TIME)
- .setAdTechDomain(AD_TECH_DOMAIN)
.setEnrollmentId(ENROLLMENT_ID)
.setDestinationOrigin(DESTINATION_ORIGIN)
.setDestinationSite(DESTINATION_SITE)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2EMockTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2EMockTest.java
index 99b69eaf43..d51526d285 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2EMockTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2EMockTest.java
@@ -78,8 +78,8 @@ public abstract class E2EMockTest extends E2ETest {
E2EMockTest(Collection<Action> actions, ReportObjects expectedOutput, String name) {
super(actions, expectedOutput, name);
- mSourceFetcher = Mockito.spy(new SourceFetcher());
- mTriggerFetcher = Mockito.spy(new TriggerFetcher());
+ mSourceFetcher = Mockito.spy(new SourceFetcher(sContext));
+ mTriggerFetcher = Mockito.spy(new TriggerFetcher(sContext));
mClickVerifier = Mockito.mock(ClickVerifier.class);
mFlags = FlagsFactory.getFlagsForTest();
when(mClickVerifier.isInputEventVerifiable(any(), anyLong())).thenReturn(true);
@@ -140,6 +140,7 @@ public abstract class E2EMockTest extends E2ETest {
void processAction(ReportingJob reportingJob) throws IOException, JSONException {
Object[] eventCaptures = EventReportingJobHandlerWrapper
.spyPerformScheduledPendingReportsInWindow(
+ sEnrollmentDao,
sDatastoreManager,
reportingJob.mTimestamp
- SystemHealthParams.MAX_EVENT_REPORT_UPLOAD_RETRY_WINDOW_MS,
@@ -147,6 +148,7 @@ public abstract class E2EMockTest extends E2ETest {
Object[] aggregateCaptures = AggregateReportingJobHandlerWrapper
.spyPerformScheduledPendingReportsInWindow(
+ sEnrollmentDao,
sDatastoreManager,
reportingJob.mTimestamp
- SystemHealthParams.MAX_EVENT_REPORT_UPLOAD_RETRY_WINDOW_MS,
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2ETest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2ETest.java
index 469b51b7d3..9e9e1b7781 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2ETest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/E2ETest.java
@@ -34,6 +34,7 @@ import androidx.annotation.Nullable;
import androidx.test.core.app.ApplicationProvider;
import com.android.adservices.data.DbHelper;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.service.measurement.actions.Action;
@@ -83,6 +84,8 @@ public abstract class E2ETest {
private static final long REPORT_TIME_EPSILON = TimeUnit.HOURS.toMillis(2);
static final Context sContext = ApplicationProvider.getApplicationContext();
+ static final EnrollmentDao sEnrollmentDao = EnrollmentDao.getInstance(
+ ApplicationProvider.getApplicationContext());
static final DatastoreManager sDatastoreManager = DatastoreManagerFactory.getDatastoreManager(
ApplicationProvider.getApplicationContext());
private final Collection<Action> mActionsList;
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/EventReportTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/EventReportTest.java
index b1b4030fb5..da5f68d7fe 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/EventReportTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/EventReportTest.java
@@ -72,7 +72,6 @@ public final class EventReportTest {
EventReport eventReport = createExample();
assertEquals("1", eventReport.getId());
assertEquals(21, eventReport.getSourceId());
- assertEquals("https://foo.com", eventReport.getAdTechDomain().toString());
assertEquals("enrollment-id", eventReport.getEnrollmentId());
assertEquals("https://bar.com", eventReport.getAttributionDestination().toString());
assertEquals(1000L, eventReport.getTriggerTime());
@@ -89,7 +88,6 @@ public final class EventReportTest {
EventReport eventReport = new EventReport.Builder().build();
assertNull(eventReport.getId());
assertEquals(0L, eventReport.getSourceId());
- assertNull(eventReport.getAdTechDomain());
assertNull(eventReport.getEnrollmentId());
assertNull(eventReport.getAttributionDestination());
assertEquals(0L, eventReport.getTriggerTime());
@@ -123,7 +121,6 @@ public final class EventReportTest {
assertEquals(0, report.getTriggerData());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
assertEquals(source.getExpiryTime() + ONE_HOUR_IN_MILLIS, report.getReportTime());
@@ -153,7 +150,6 @@ public final class EventReportTest {
assertEquals(0, report.getTriggerData());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
assertEquals(source.getExpiryTime() + ONE_HOUR_IN_MILLIS, report.getReportTime());
@@ -180,7 +176,6 @@ public final class EventReportTest {
assertEquals(TRIGGER_DEDUP_KEY, report.getTriggerDedupKey());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
assertEquals(source.getExpiryTime() + ONE_HOUR_IN_MILLIS, report.getReportTime());
@@ -210,7 +205,6 @@ public final class EventReportTest {
assertEquals(TRIGGER_DEDUP_KEY, report.getTriggerDedupKey());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
assertEquals(source.getExpiryTime() + ONE_HOUR_IN_MILLIS, report.getReportTime());
@@ -238,7 +232,6 @@ public final class EventReportTest {
assertEquals(TRIGGER_DEDUP_KEY, report.getTriggerDedupKey());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(APP_DESTINATION, report.getAttributionDestination());
assertEquals(
@@ -271,7 +264,6 @@ public final class EventReportTest {
assertEquals(TRIGGER_DEDUP_KEY, report.getTriggerDedupKey());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
assertEquals(
@@ -303,7 +295,6 @@ public final class EventReportTest {
assertEquals(4, report.getTriggerData());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
// One hour after install attributed navigation type window
@@ -340,7 +331,6 @@ public final class EventReportTest {
assertEquals(4, report.getTriggerData());
assertEquals(trigger.getTriggerTime(), report.getTriggerTime());
assertEquals(source.getEventId(), report.getSourceId());
- assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
assertEquals(source.getEnrollmentId(), report.getEnrollmentId());
assertEquals(trigger.getAttributionDestination(), report.getAttributionDestination());
// One hour after regular navigation type window (without install attribution consideration)
@@ -372,7 +362,6 @@ public final class EventReportTest {
new EventReport.Builder()
.setId("1")
.setSourceId(22)
- .setAdTechDomain(Uri.parse("https://foo.com"))
.setEnrollmentId("another-enrollment-id")
.setAttributionDestination(Uri.parse("https://bar.com"))
.setTriggerTime(1000L)
@@ -401,7 +390,6 @@ public final class EventReportTest {
.setSourceType(sourceType)
.setInstallCooldownWindow(isInstallAttributable ? 100 : 0)
.setEventTime(eventTime)
- .setAdTechDomain(Uri.parse("https://example-adtech1.com"))
.setEnrollmentId("enrollment-id")
.setAppDestination(appDestination)
.setWebDestination(webDestination)
@@ -413,7 +401,6 @@ public final class EventReportTest {
return TriggerFixture.getValidTriggerBuilder()
.setTriggerTime(eventTime)
.setEventTriggers(EVENT_TRIGGERS)
- .setAdTechDomain(Uri.parse("https://example-adtech2.com"))
.setEnrollmentId("enrollment-id")
.setAttributionDestination(destination)
.build();
@@ -423,7 +410,6 @@ public final class EventReportTest {
return new EventReport.Builder()
.setId("1")
.setSourceId(21)
- .setAdTechDomain(Uri.parse("https://foo.com"))
.setEnrollmentId("enrollment-id")
.setAttributionDestination(Uri.parse("https://bar.com"))
.setTriggerTime(1000L)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/MeasurementImplTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/MeasurementImplTest.java
index f14ab90d3a..c4a50a9d10 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/MeasurementImplTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/MeasurementImplTest.java
@@ -68,6 +68,7 @@ import android.view.MotionEvent;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.SmallTest;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreException;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
@@ -77,12 +78,12 @@ import com.android.adservices.service.Flags;
import com.android.adservices.service.FlagsFactory;
import com.android.adservices.service.consent.AdServicesApiConsent;
import com.android.adservices.service.consent.ConsentManager;
+import com.android.adservices.service.enrollment.EnrollmentData;
import com.android.adservices.service.measurement.inputverification.ClickVerifier;
import com.android.adservices.service.measurement.registration.SourceFetcher;
import com.android.adservices.service.measurement.registration.SourceRegistration;
import com.android.adservices.service.measurement.registration.TriggerFetcher;
import com.android.adservices.service.measurement.registration.TriggerRegistration;
-import com.android.adservices.service.measurement.util.BaseUriExtractor;
import com.android.dx.mockito.inline.extended.ExtendedMockito;
import org.junit.Assert;
@@ -118,6 +119,7 @@ public final class MeasurementImplTest {
private static final Uri DEFAULT_URI = Uri.parse("android-app://com.example.abc");
private static final Uri REGISTRATION_URI_1 = Uri.parse("https://foo.com/bar?ad=134");
private static final Uri REGISTRATION_URI_2 = Uri.parse("https://foo.com/bar?ad=256");
+ private static final String DEFAULT_ENROLLMENT = "enrollment-id";
private static final Uri WEB_DESTINATION = Uri.parse("https://web-destination.com");
private static final Uri WEB_DESTINATION_WITH_SUBDOMAIN =
Uri.parse("https://subdomain.web-destination.com");
@@ -161,7 +163,7 @@ public final class MeasurementImplTest {
private static final TriggerRegistration VALID_TRIGGER_REGISTRATION =
new TriggerRegistration.Builder()
.setTopOrigin(Uri.parse("https://foo.com"))
- .setRegistrationUri(Uri.parse("https://bar.com"))
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.setEventTriggers(EVENT_TRIGGERS)
.setAggregateTriggerData(
"[{\"key_piece\":\"0x400\",\"source_keys\":[\"campaignCounts\"],"
@@ -172,26 +174,26 @@ public final class MeasurementImplTest {
.build();
private static final SourceRegistration VALID_SOURCE_REGISTRATION_1 =
new com.android.adservices.service.measurement.registration.SourceRegistration.Builder()
- .setSourceEventId(1L) //
- .setSourcePriority(100L) //
+ .setSourceEventId(1L)
+ .setSourcePriority(100L)
.setAppDestination(Uri.parse("android-app://com.destination"))
.setWebDestination(Uri.parse("https://web-destination.com"))
- .setExpiry(8640000010L) //
- .setInstallAttributionWindow(841839879274L) //
- .setInstallCooldownWindow(8418398274L) //
- .setRegistrationUri(Uri.parse("https://example.com")) //
+ .setExpiry(8640000010L)
+ .setInstallAttributionWindow(841839879274L)
+ .setInstallCooldownWindow(8418398274L)
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.setTopOrigin(Uri.parse("android-app://com.source"))
.build();
private static final SourceRegistration VALID_SOURCE_REGISTRATION_2 =
new com.android.adservices.service.measurement.registration.SourceRegistration.Builder()
- .setSourceEventId(2) //
- .setSourcePriority(200L) //
+ .setSourceEventId(2)
+ .setSourcePriority(200L)
.setAppDestination(Uri.parse("android-app://com.destination2"))
.setWebDestination(Uri.parse("https://web-destination2.com"))
- .setExpiry(865000010L) //
- .setInstallAttributionWindow(841839879275L) //
- .setInstallCooldownWindow(7418398274L) //
- .setRegistrationUri(Uri.parse("https://example2.com")) //
+ .setExpiry(865000010L)
+ .setInstallAttributionWindow(841839879275L)
+ .setInstallCooldownWindow(7418398274L)
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.setTopOrigin(Uri.parse("android-app://com.source2"))
.build();
private static final WebSourceParams INPUT_SOURCE_REGISTRATION_1 =
@@ -228,6 +230,12 @@ public final class MeasurementImplTest {
private MeasurementImpl mMeasurementImpl;
@Mock
ITransaction mTransaction;
+ @Mock
+ EnrollmentDao mEnrollmentDao;
+
+ private static EnrollmentData getEnrollment(String enrollmentId) {
+ return new EnrollmentData.Builder().setEnrollmentId(enrollmentId).build();
+ }
class FakeDatastoreManager extends DatastoreManager {
@@ -309,6 +317,8 @@ public final class MeasurementImplTest {
mTriggerFetcher,
mClickVerifier));
doReturn(true).when(mClickVerifier).isInputEventVerifiable(any(), anyLong());
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(any()))
+ .thenReturn(getEnrollment(DEFAULT_ENROLLMENT));
}
@Test
@@ -322,10 +332,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
DatastoreManager datastoreManager = spy(new FakeDatastoreManager());
@@ -353,9 +363,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, times(2))
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(4))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, times(4)).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, times(4)).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchTrigger(any());
@@ -402,10 +412,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(100));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
DatastoreManager datastoreManager = spy(new FakeDatastoreManager());
@@ -433,9 +443,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, never())
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(2))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, never()).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, never()).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchTrigger(any());
}
@@ -451,10 +461,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(100))
.thenReturn(Integer.valueOf(0));
@@ -483,9 +493,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, times(1))
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(4))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, times(3)).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, times(3)).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchTrigger(any());
@@ -631,7 +641,6 @@ public final class MeasurementImplTest {
// Creating source for easy comparison
Source sampleSource =
SourceFixture.getValidSourceBuilder()
- .setAdTechDomain(BaseUriExtractor.getBaseUri(REGISTRATION_URI_1))
.setSourceType(Source.SourceType.NAVIGATION)
.setExpiryTime(eventTime + TimeUnit.SECONDS.toMillis(expiry))
.setEventTime(eventTime)
@@ -647,14 +656,14 @@ public final class MeasurementImplTest {
.setAppDestination(sampleSource.getAppDestination())
.setTopOrigin(sampleSource.getPublisher())
.setExpiry(expiry)
- .setRegistrationUri(sampleSource.getAdTechDomain())
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.build());
doReturn(Optional.of(sourceRegistrations)).when(mSourceFetcher).fetchSource(any());
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
@@ -689,7 +698,6 @@ public final class MeasurementImplTest {
assertEquals(sampleSource.getEventTime(), capturedSource.getEventTime());
assertEquals(sampleSource.getAggregateSource(), capturedSource.getAggregateSource());
assertEquals(sampleSource.getAppDestination(), capturedSource.getAppDestination());
- assertEquals(sampleSource.getAdTechDomain(), capturedSource.getAdTechDomain());
assertEquals(sampleSource.getPublisher(), capturedSource.getPublisher());
assertEquals(sampleSource.getPriority(), capturedSource.getPriority());
@@ -707,7 +715,6 @@ public final class MeasurementImplTest {
.setEventTime(eventTime)
.setExpiryTime(eventTime + TimeUnit.DAYS.toMillis(20))
.setSourceType(Source.SourceType.NAVIGATION)
- .setAdTechDomain(BaseUriExtractor.getBaseUri(REGISTRATION_URI_1))
.setAppDestination(DEFAULT_URI)
.setPublisher(DEFAULT_URI)
.build());
@@ -736,7 +743,6 @@ public final class MeasurementImplTest {
Assert.assertEquals(source.getEventTime(), report.getTriggerTime());
Assert.assertEquals(0, report.getTriggerPriority());
Assert.assertEquals(source.getAppDestination(), report.getAttributionDestination());
- Assert.assertEquals(source.getAdTechDomain(), report.getAdTechDomain());
Assert.assertTrue(report.getTriggerData()
< source.getTriggerDataCardinality());
Assert.assertNull(report.getTriggerDedupKey());
@@ -827,10 +833,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
DatastoreManager datastoreManager = spy(new FakeDatastoreManager());
@@ -858,9 +864,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, times(2))
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(4))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, times(4)).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, times(4)).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchWebTriggers(any());
@@ -919,10 +925,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(100));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
DatastoreManager datastoreManager = spy(new FakeDatastoreManager());
@@ -950,9 +956,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, never())
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(2))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, never()).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, never()).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchWebTriggers(any());
}
@@ -969,10 +975,10 @@ public final class MeasurementImplTest {
ArgumentCaptor<ThrowingCheckedConsumer> insertionLogicExecutorCaptor =
ArgumentCaptor.forClass(ThrowingCheckedConsumer.class);
- when(mMeasurementDao.countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ when(mMeasurementDao.countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(0));
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInSource(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong()))
.thenReturn(Integer.valueOf(100))
.thenReturn(Integer.valueOf(0));
@@ -1001,9 +1007,9 @@ public final class MeasurementImplTest {
verify(datastoreManager, times(1))
.runInTransaction(insertionLogicExecutorCaptor.capture());
verify(mMeasurementDao, times(4))
- .countDistinctDestinationsPerPublisherXAdTechInActiveSource(
+ .countDistinctDestinationsPerPublisherXEnrollmentInActiveSource(
any(), anyInt(), any(), any(), anyInt(), anyLong(), anyLong());
- verify(mMeasurementDao, times(3)).countDistinctAdTechsPerPublisherXDestinationInSource(
+ verify(mMeasurementDao, times(3)).countDistinctEnrollmentsPerPublisherXDestinationInSource(
any(), anyInt(), any(), any(), anyLong(), anyLong());
verify(mTriggerFetcher, never()).fetchWebTriggers(any());
@@ -1326,9 +1332,9 @@ public final class MeasurementImplTest {
assertEquals(
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setDestinationOrigin(source.getAppDestination().toString())
.setDestinationSite(source.getAppDestination().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setSourceOrigin(source.getPublisher().toString())
.setSourceSite(source.getPublisher().toString())
.setRegistrant(source.getRegistrant().toString())
@@ -1384,9 +1390,9 @@ public final class MeasurementImplTest {
assertEquals(
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setDestinationOrigin(source.getWebDestination().toString())
.setDestinationSite(source.getWebDestination().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setSourceOrigin(source.getPublisher().toString())
.setSourceSite(source.getPublisher().toString())
.setRegistrant(source.getRegistrant().toString())
@@ -1446,9 +1452,9 @@ public final class MeasurementImplTest {
assertEquals(
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setDestinationOrigin(source.getAppDestination().toString())
.setDestinationSite(source.getAppDestination().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setSourceOrigin(source.getPublisher().toString())
.setSourceSite(source.getPublisher().toString())
.setRegistrant(source.getRegistrant().toString())
@@ -1458,9 +1464,9 @@ public final class MeasurementImplTest {
assertEquals(
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setDestinationOrigin(source.getWebDestination().toString())
.setDestinationSite(source.getWebDestination().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setSourceOrigin(source.getPublisher().toString())
.setSourceSite(source.getPublisher().toString())
.setRegistrant(source.getRegistrant().toString())
@@ -1514,9 +1520,9 @@ public final class MeasurementImplTest {
assertEquals(
new Attribution.Builder()
- .setAdTechDomain(source.getAdTechDomain().toString())
.setDestinationOrigin(source.getAppDestination().toString())
.setDestinationSite(source.getAppDestination().toString())
+ .setEnrollmentId(source.getEnrollmentId())
.setSourceOrigin(source.getPublisher().toString())
.setSourceSite(source.getPublisher().toString())
.setRegistrant(source.getRegistrant().toString())
@@ -1586,7 +1592,7 @@ public final class MeasurementImplTest {
.setPublisherType(publisherType)
.setAppDestination(firstSourceDestination)
.setWebDestination(firstSourceWebDestination)
- .setAdTechDomain(sourceRegistration.getRegistrationUri())
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.setRegistrant(Uri.parse("android-app://" + packageName))
.setEventTime(eventTime)
.setExpiryTime(
@@ -1609,8 +1615,7 @@ public final class MeasurementImplTest {
return TriggerFixture.getValidTriggerBuilder()
.setAttributionDestination(destination)
.setDestinationType(destinationType)
- .setAdTechDomain(
- MeasurementImplTest.VALID_TRIGGER_REGISTRATION.getRegistrationUri())
+ .setEnrollmentId(DEFAULT_ENROLLMENT)
.setRegistrant(Uri.parse(ANDROID_APP_SCHEME + attributionSource.getPackageName()))
.setTriggerTime(triggerTime)
.setEventTriggers(EVENT_TRIGGERS)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/SourceTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/SourceTest.java
index 3dd4b21be0..6bc9730a08 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/SourceTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/SourceTest.java
@@ -83,7 +83,6 @@ public class SourceTest {
aggregateFilterData.put("product", Arrays.asList("1234", "2345"));
assertEquals(
new Source.Builder()
- .setAdTechDomain(Uri.parse("https://example.com"))
.setEnrollmentId("enrollment-id")
.setAppDestination(Uri.parse("android-app://example.com/aD1"))
.setWebDestination(Uri.parse("https://example.com/aD2"))
@@ -106,7 +105,6 @@ public class SourceTest {
SourceFixture.getValidSource().getAggregatableAttributionSource())
.build(),
new Source.Builder()
- .setAdTechDomain(Uri.parse("https://example.com"))
.setEnrollmentId("enrollment-id")
.setAppDestination(Uri.parse("android-app://example.com/aD1"))
.setWebDestination(Uri.parse("https://example.com/aD2"))
@@ -154,13 +152,6 @@ public class SourceTest {
.build());
assertNotEquals(
SourceFixture.getValidSourceBuilder()
- .setAdTechDomain(Uri.parse("https://1.com"))
- .build(),
- SourceFixture.getValidSourceBuilder()
- .setAdTechDomain(Uri.parse("https://2.com"))
- .build());
- assertNotEquals(
- SourceFixture.getValidSourceBuilder()
.setEnrollmentId("enrollment-id-1")
.build(),
SourceFixture.getValidSourceBuilder()
@@ -253,7 +244,6 @@ public class SourceTest {
null,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -272,7 +262,6 @@ public class SourceTest {
Uri.parse("com.source"),
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -294,7 +283,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
null,
null,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -313,7 +301,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
Uri.parse("com.destination"),
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -332,7 +319,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
Uri.parse("com.destination"),
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -348,55 +334,12 @@ public class SourceTest {
}
@Test
- public void testSourceBuilder_validateArgumentAdTechDomain() {
- assertInvalidSourceArguments(
- SourceFixture.ValidSourceParams.SOURCE_EVENT_ID,
- SourceFixture.ValidSourceParams.PUBLISHER,
- SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
- SourceFixture.ValidSourceParams.WEB_DESTINATION,
- null,
- SourceFixture.ValidSourceParams.ENROLLMENT_ID,
- SourceFixture.ValidSourceParams.REGISTRANT,
- SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
- SourceFixture.ValidSourceParams.EXPIRY_TIME,
- SourceFixture.ValidSourceParams.PRIORITY,
- SourceFixture.ValidSourceParams.SOURCE_TYPE,
- SourceFixture.ValidSourceParams.INSTALL_ATTRIBUTION_WINDOW,
- SourceFixture.ValidSourceParams.INSTALL_COOLDOWN_WINDOW,
- SourceFixture.ValidSourceParams.DEBUG_KEY,
- SourceFixture.ValidSourceParams.ATTRIBUTION_MODE,
- SourceFixture.ValidSourceParams.buildAggregateSource(),
- SourceFixture.ValidSourceParams.buildAggregateFilterData());
-
- assertInvalidSourceArguments(
- SourceFixture.ValidSourceParams.SOURCE_EVENT_ID,
- SourceFixture.ValidSourceParams.PUBLISHER,
- SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
- SourceFixture.ValidSourceParams.WEB_DESTINATION,
- Uri.parse("com.adTechDomain"),
- SourceFixture.ValidSourceParams.ENROLLMENT_ID,
- SourceFixture.ValidSourceParams.REGISTRANT,
- SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
- SourceFixture.ValidSourceParams.EXPIRY_TIME,
- SourceFixture.ValidSourceParams.PRIORITY,
- SourceFixture.ValidSourceParams.SOURCE_TYPE,
- SourceFixture.ValidSourceParams.INSTALL_ATTRIBUTION_WINDOW,
- SourceFixture.ValidSourceParams.INSTALL_COOLDOWN_WINDOW,
- SourceFixture.ValidSourceParams.DEBUG_KEY,
- SourceFixture.ValidSourceParams.ATTRIBUTION_MODE,
- SourceFixture.ValidSourceParams.buildAggregateSource(),
- SourceFixture.ValidSourceParams.buildAggregateFilterData());
- }
-
- //TODO (b/238924528): uncomment when enforcing enrollment.
- /*@Test
public void testSourceBuilder_validateArgumentEnrollmentId() {
assertInvalidSourceArguments(
SourceFixture.ValidSourceParams.SOURCE_EVENT_ID,
SourceFixture.ValidSourceParams.PUBLISHER,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
null,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -409,7 +352,7 @@ public class SourceTest {
SourceFixture.ValidSourceParams.ATTRIBUTION_MODE,
SourceFixture.ValidSourceParams.buildAggregateSource(),
SourceFixture.ValidSourceParams.buildAggregateFilterData());
- }*/
+ }
@Test
public void testSourceBuilder_validateArgumentRegistrant() {
@@ -418,7 +361,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
null,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -437,7 +379,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
Uri.parse("com.registrant"),
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -459,7 +400,6 @@ public class SourceTest {
SourceFixture.ValidSourceParams.PUBLISHER,
SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATION,
SourceFixture.ValidSourceParams.WEB_DESTINATION,
- SourceFixture.ValidSourceParams.AD_TECH_DOMAIN,
SourceFixture.ValidSourceParams.ENROLLMENT_ID,
SourceFixture.ValidSourceParams.REGISTRANT,
SourceFixture.ValidSourceParams.SOURCE_EVENT_TIME,
@@ -1404,7 +1344,6 @@ public class SourceTest {
Uri publisher,
Uri appDestination,
Uri webDestination,
- Uri adTechDomain,
String enrollmentId,
Uri registrant,
Long sourceEventTime,
@@ -1425,7 +1364,6 @@ public class SourceTest {
.setPublisher(publisher)
.setAppDestination(appDestination)
.setWebDestination(webDestination)
- .setAdTechDomain(adTechDomain)
.setEnrollmentId(enrollmentId)
.setRegistrant(registrant)
.setEventTime(sourceEventTime)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TestObjectProvider.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TestObjectProvider.java
index 97bec9db1c..07974cfb43 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TestObjectProvider.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TestObjectProvider.java
@@ -97,7 +97,7 @@ class TestObjectProvider {
.setReportTime(source.getExpiryTime() + ONE_HOUR_IN_MILLIS)
.setTriggerData(0)
.setAttributionDestination(source.getAppDestination())
- .setAdTechDomain(source.getAdTechDomain())
+ .setEnrollmentId(source.getEnrollmentId())
.setTriggerTime(0)
.setTriggerPriority(0L)
.setTriggerDedupKey(null)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TriggerTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TriggerTest.java
index b73913d7da..c563d9a421 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TriggerTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/TriggerTest.java
@@ -85,7 +85,6 @@ public class TriggerTest {
values.put("geoValue", 1664);
assertEquals(
TriggerFixture.getValidTriggerBuilder()
- .setAdTechDomain(Uri.parse("https://example.com"))
.setEnrollmentId("enrollment-id")
.setAttributionDestination(Uri.parse("https://example.com/aD"))
.setDestinationType(EventSurfaceType.WEB)
@@ -103,7 +102,6 @@ public class TriggerTest {
.getAggregatableAttributionTrigger())
.build(),
TriggerFixture.getValidTriggerBuilder()
- .setAdTechDomain(Uri.parse("https://example.com"))
.setEnrollmentId("enrollment-id")
.setAttributionDestination(Uri.parse("https://example.com/aD"))
.setDestinationType(EventSurfaceType.WEB)
@@ -139,11 +137,6 @@ public class TriggerTest {
.setDestinationType(EventSurfaceType.WEB).build());
assertNotEquals(
TriggerFixture.getValidTriggerBuilder()
- .setAdTechDomain(Uri.parse("https://1.com")).build(),
- TriggerFixture.getValidTriggerBuilder()
- .setAdTechDomain(Uri.parse("https://2.com")).build());
- assertNotEquals(
- TriggerFixture.getValidTriggerBuilder()
.setEnrollmentId("enrollment-id-1").build(),
TriggerFixture.getValidTriggerBuilder()
.setEnrollmentId("enrollment-id-2").build());
@@ -222,7 +215,6 @@ public class TriggerTest {
public void testTriggerBuilder_validateArgumentAttributionDestination() {
assertInvalidTriggerArguments(
null,
- TriggerFixture.ValidTriggerParams.AD_TECH_DOMAIN,
TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
TriggerFixture.ValidTriggerParams.REGISTRANT,
TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
@@ -233,7 +225,6 @@ public class TriggerTest {
TriggerFixture.ValidTriggerParams.DEBUG_KEY);
assertInvalidTriggerArguments(
Uri.parse("com.destination"),
- TriggerFixture.ValidTriggerParams.AD_TECH_DOMAIN,
TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
TriggerFixture.ValidTriggerParams.REGISTRANT,
TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
@@ -245,37 +236,9 @@ public class TriggerTest {
}
@Test
- public void testTriggerBuilder_validateArgumentAdTechDomain() {
- assertInvalidTriggerArguments(
- TriggerFixture.ValidTriggerParams.ATTRIBUTION_DESTINATION,
- null,
- TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
- TriggerFixture.ValidTriggerParams.REGISTRANT,
- TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
- TriggerFixture.ValidTriggerParams.EVENT_TRIGGERS,
- TriggerFixture.ValidTriggerParams.AGGREGATE_TRIGGER_DATA,
- TriggerFixture.ValidTriggerParams.AGGREGATE_VALUES,
- TriggerFixture.ValidTriggerParams.TOP_LEVEL_FILTERS_JSON_STRING,
- TriggerFixture.ValidTriggerParams.DEBUG_KEY);
- assertInvalidTriggerArguments(
- TriggerFixture.ValidTriggerParams.ATTRIBUTION_DESTINATION,
- Uri.parse("com.adTechDomain"),
- TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
- TriggerFixture.ValidTriggerParams.REGISTRANT,
- TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
- TriggerFixture.ValidTriggerParams.EVENT_TRIGGERS,
- TriggerFixture.ValidTriggerParams.AGGREGATE_TRIGGER_DATA,
- TriggerFixture.ValidTriggerParams.AGGREGATE_VALUES,
- TriggerFixture.ValidTriggerParams.TOP_LEVEL_FILTERS_JSON_STRING,
- TriggerFixture.ValidTriggerParams.DEBUG_KEY);
- }
-
- // TODO (b/238924528): uncomment when enforcing enrollment
- /*@Test
public void testTriggerBuilder_validateArgumentEnrollmentId() {
assertInvalidTriggerArguments(
TriggerFixture.ValidTriggerParams.ATTRIBUTION_DESTINATION,
- TriggerFixture.ValidTriggerParams.AD_TECH_DOMAIN,
null,
TriggerFixture.ValidTriggerParams.REGISTRANT,
TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
@@ -284,13 +247,12 @@ public class TriggerTest {
TriggerFixture.ValidTriggerParams.AGGREGATE_VALUES,
TriggerFixture.ValidTriggerParams.TOP_LEVEL_FILTERS_JSON_STRING,
TriggerFixture.ValidTriggerParams.DEBUG_KEY);
- }*/
+ }
@Test
public void testTriggerBuilder_validateArgumentRegistrant() {
assertInvalidTriggerArguments(
TriggerFixture.ValidTriggerParams.ATTRIBUTION_DESTINATION,
- TriggerFixture.ValidTriggerParams.AD_TECH_DOMAIN,
TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
null,
TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
@@ -301,7 +263,6 @@ public class TriggerTest {
TriggerFixture.ValidTriggerParams.DEBUG_KEY);
assertInvalidTriggerArguments(
TriggerFixture.ValidTriggerParams.ATTRIBUTION_DESTINATION,
- TriggerFixture.ValidTriggerParams.AD_TECH_DOMAIN,
TriggerFixture.ValidTriggerParams.ENROLLMENT_ID,
Uri.parse("com.registrant"),
TriggerFixture.ValidTriggerParams.TRIGGER_TIME,
@@ -462,7 +423,6 @@ public class TriggerTest {
private void assertInvalidTriggerArguments(
Uri attributionDestination,
- Uri adTechDomain,
String enrollmentId,
Uri registrant,
Long triggerTime,
@@ -476,7 +436,6 @@ public class TriggerTest {
() ->
new Trigger.Builder()
.setAttributionDestination(attributionDestination)
- .setAdTechDomain(adTechDomain)
.setEnrollmentId(enrollmentId)
.setRegistrant(registrant)
.setTriggerTime(triggerTime)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/aggregation/AggregateReportTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/aggregation/AggregateReportTest.java
index fb4386767a..3c1e3d0fbf 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/aggregation/AggregateReportTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/aggregation/AggregateReportTest.java
@@ -40,7 +40,6 @@ public final class AggregateReportTest {
.setAttributionDestination(Uri.parse("https://example.com/aS"))
.setSourceRegistrationTime(5L)
.setScheduledReportTime(1L)
- .setAdTechDomain(Uri.parse("https://example.com/rT"))
.setEnrollmentId("enrollment-id")
.setDebugCleartextPayload(" key: 1369, value: 32768; key: 3461, value: 1664;")
.setAggregateAttributionData(
@@ -59,7 +58,6 @@ public final class AggregateReportTest {
attributionReport.getAttributionDestination());
assertEquals(5L, attributionReport.getSourceRegistrationTime());
assertEquals(1L, attributionReport.getScheduledReportTime());
- assertEquals(Uri.parse("https://example.com/rT"), attributionReport.getAdTechDomain());
assertEquals("enrollment-id", attributionReport.getEnrollmentId());
assertEquals(" key: 1369, value: 32768; key: 3461, value: 1664;",
attributionReport.getDebugCleartextPayload());
@@ -77,7 +75,6 @@ public final class AggregateReportTest {
assertNull(attributionReport.getAttributionDestination());
assertEquals(0L, attributionReport.getSourceRegistrationTime());
assertEquals(0L, attributionReport.getScheduledReportTime());
- assertNull(attributionReport.getAdTechDomain());
assertNull(attributionReport.getEnrollmentId());
assertNull(attributionReport.getDebugCleartextPayload());
assertNull(attributionReport.getAggregateAttributionData());
@@ -106,7 +103,6 @@ public final class AggregateReportTest {
.setAttributionDestination(Uri.parse("https://example.com/aS"))
.setSourceRegistrationTime(1L)
.setScheduledReportTime(1L)
- .setAdTechDomain(Uri.parse("https://example.com/rT"))
.setEnrollmentId("another-enrollment-id")
.setDebugCleartextPayload(
" key: 1369, value: 32768; key: 3461, value: 1664;")
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/AttributionJobHandlerTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/AttributionJobHandlerTest.java
index e306211e34..95b8388675 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/AttributionJobHandlerTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/AttributionJobHandlerTest.java
@@ -227,11 +227,11 @@ public class AttributionJobHandlerTest {
List<Source> matchingSourceList = new ArrayList<>();
matchingSourceList.add(source);
when(mMeasurementDao.getMatchingActiveSources(trigger)).thenReturn(matchingSourceList);
- when(mMeasurementDao.countDistinctAdTechsPerPublisherXDestinationInAttribution(
+ when(mMeasurementDao.countDistinctEnrollmentsPerPublisherXDestinationInAttribution(
any(), any(), any(), anyLong(), anyLong())).thenReturn(10);
AttributionJobHandler attributionService = new AttributionJobHandler(mDatastoreManager);
attributionService.performPendingAttributions();
- verify(mMeasurementDao).countDistinctAdTechsPerPublisherXDestinationInAttribution(
+ verify(mMeasurementDao).countDistinctEnrollmentsPerPublisherXDestinationInAttribution(
any(), any(), any(), anyLong(), anyLong());
ArgumentCaptor<Trigger> triggerArg = ArgumentCaptor.forClass(Trigger.class);
verify(mMeasurementDao).updateTriggerStatus(triggerArg.capture());
@@ -1074,9 +1074,9 @@ public class AttributionJobHandlerTest {
.setTriggerData(1L)
.setTriggerTime(234324L)
.setSourceId(source.getEventId())
- .setAdTechDomain(source.getAdTechDomain())
.setStatus(EventReport.Status.PENDING)
.setAttributionDestination(source.getAppDestination())
+ .setEnrollmentId(source.getEnrollmentId())
.setReportTime(
source.getReportingTime(
trigger.getTriggerTime(), trigger.getDestinationType()))
@@ -1152,9 +1152,9 @@ public class AttributionJobHandlerTest {
.setTriggerData(1L)
.setTriggerTime(234324L)
.setSourceId(source.getEventId())
- .setAdTechDomain(source.getAdTechDomain())
.setStatus(EventReport.Status.PENDING)
.setAttributionDestination(source.getAppDestination())
+ .setEnrollmentId(source.getEnrollmentId())
.setReportTime(
source.getReportingTime(
trigger.getTriggerTime(), trigger.getDestinationType()))
@@ -1233,9 +1233,9 @@ public class AttributionJobHandlerTest {
.setTriggerData(3L)
.setTriggerTime(234324L)
.setSourceId(source.getEventId())
- .setAdTechDomain(source.getAdTechDomain())
.setStatus(EventReport.Status.PENDING)
.setAttributionDestination(source.getAppDestination())
+ .setEnrollmentId(source.getEnrollmentId())
.setReportTime(
source.getReportingTime(
trigger.getTriggerTime(), trigger.getDestinationType()))
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ResponseBasedFetcherTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ResponseBasedFetcherTest.java
index 706b0d430a..cd75c9c5c6 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ResponseBasedFetcherTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ResponseBasedFetcherTest.java
@@ -28,7 +28,6 @@ import org.junit.Test;
import java.util.List;
import java.util.Map;
-
/**
* Unit tests for {@link ResponseBasedFetcher}
*/
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceFetcherTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceFetcherTest.java
index 7f337e06cf..1243a0138b 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceFetcherTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceFetcherTest.java
@@ -40,6 +40,9 @@ import android.net.Uri;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
+import com.android.adservices.data.enrollment.EnrollmentDao;
+import com.android.adservices.service.enrollment.EnrollmentData;
+
import org.json.JSONArray;
import org.json.JSONException;
import org.junit.Assert;
@@ -69,6 +72,10 @@ import javax.net.ssl.HttpsURLConnection;
@SmallTest
public final class SourceFetcherTest {
private static final String DEFAULT_REGISTRATION = "https://foo.com";
+ private static final String ENROLLMENT_ID = "enrollment-id";
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setEnrollmentId("enrollment-id")
+ .build();
private static final String DEFAULT_TOP_ORIGIN = "https://baz.com";
private static final String DEFAULT_DESTINATION = "android-app://com.myapps";
private static final String DEFAULT_DESTINATION_WITHOUT_SCHEME = "com.myapps";
@@ -105,11 +112,15 @@ public final class SourceFetcherTest {
@Mock HttpsURLConnection mUrlConnection1;
@Mock HttpsURLConnection mUrlConnection2;
@Mock AdIdPermissionFetcher mAdIdPermissionFetcher;
+ @Mock EnrollmentDao mEnrollmentDao;
@Before
public void setup() {
- mFetcher = spy(new SourceFetcher(mAdIdPermissionFetcher));
+ mFetcher = spy(new SourceFetcher(mEnrollmentDao, mAdIdPermissionFetcher));
when(mAdIdPermissionFetcher.isAdIdPermissionEnabled()).thenReturn(false);
+ // For convenience, return the same enrollment-ID since we're using many arbitrary
+ // registration URIs and not yet enforcing uniqueness of enrollment.
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(any())).thenReturn(ENROLLMENT);
}
@Test
@@ -146,7 +157,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_PRIORITY, result.get(0).getSourcePriority());
assertEquals(DEFAULT_EXPIRY, result.get(0).getExpiry());
@@ -157,6 +168,41 @@ public final class SourceFetcherTest {
}
@Test
+ public void testBasicSourceRequest_failsWhenNotEnrolled() throws Exception {
+ when(mAdIdPermissionFetcher.isAdIdPermissionEnabled()).thenReturn(true);
+ RegistrationRequest request = buildRequest(DEFAULT_REGISTRATION, DEFAULT_TOP_ORIGIN);
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(any())).thenReturn(null);
+ doReturn(mUrlConnection).when(mFetcher).openUrl(new URL(DEFAULT_REGISTRATION));
+ when(mUrlConnection.getResponseCode()).thenReturn(200);
+ when(mUrlConnection.getHeaderFields())
+ .thenReturn(
+ Map.of(
+ "Attribution-Reporting-Register-Source",
+ List.of(
+ "{\n"
+ + " \"destination\": \""
+ + DEFAULT_DESTINATION
+ + "\",\n"
+ + " \"priority\": \""
+ + DEFAULT_PRIORITY
+ + "\",\n"
+ + " \"expiry\": \""
+ + DEFAULT_EXPIRY
+ + "\",\n"
+ + " \"source_event_id\": \""
+ + DEFAULT_EVENT_ID
+ + "\",\n"
+ + " \"debug_key\": \""
+ + DEBUG_KEY
+ + "\"\n"
+ + "}\n")));
+
+ Optional<List<SourceRegistration>> fetch = mFetcher.fetchSource(request);
+ assertFalse(fetch.isPresent());
+ verify(mFetcher, never()).openUrl(any());
+ }
+
+ @Test
public void testBasicSourceRequestWithoutAdIdPermission() throws Exception {
Mockito.when(mAdIdPermissionFetcher.isAdIdPermissionEnabled()).thenReturn(false);
RegistrationRequest request = buildRequest(DEFAULT_REGISTRATION, DEFAULT_TOP_ORIGIN);
@@ -190,7 +236,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_PRIORITY, result.get(0).getSourcePriority());
assertEquals(DEFAULT_EXPIRY, result.get(0).getExpiry());
@@ -226,7 +272,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("android-app://com.myapps", result.get(0).getAppDestination().toString());
assertEquals(123, result.get(0).getSourcePriority());
assertEquals(456789, result.get(0).getExpiry());
@@ -266,7 +312,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("android-app://com.myapps", result.get(0).getAppDestination().toString());
assertEquals(123, result.get(0).getSourcePriority());
assertEquals(456789, result.get(0).getExpiry());
@@ -306,7 +352,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("android-app://com.myapps", result.get(0).getAppDestination().toString());
assertEquals(123, result.get(0).getSourcePriority());
assertEquals(456789, result.get(0).getExpiry());
@@ -391,7 +437,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(0, result.get(0).getSourcePriority());
@@ -424,7 +470,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("android-app://com.myapps", result.get(0).getAppDestination().toString());
assertEquals(123, result.get(0).getSourceEventId());
assertEquals(0, result.get(0).getSourcePriority());
@@ -450,7 +496,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(0, result.get(0).getSourcePriority());
@@ -476,7 +522,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(0, result.get(0).getSourcePriority());
@@ -522,7 +568,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(0, result.get(0).getSourcePriority());
@@ -586,13 +632,13 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(2, result.size());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(DEFAULT_PRIORITY, result.get(0).getSourcePriority());
assertEquals(DEFAULT_EXPIRY, result.get(0).getExpiry());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(1).getTopOrigin().toString());
- assertEquals(ALT_REGISTRATION, result.get(1).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(1).getEnrollmentId());
assertEquals(ALT_DESTINATION, result.get(1).getAppDestination().toString());
assertEquals(ALT_EVENT_ID, result.get(1).getSourceEventId());
assertEquals(ALT_PRIORITY, result.get(1).getSourcePriority());
@@ -641,19 +687,19 @@ public final class SourceFetcherTest {
assertEquals(3, result.size());
result.sort((o1, o2) -> (int) (o2.getSourcePriority() - o1.getSourcePriority()));
assertEquals(DEFAULT_TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(DEFAULT_REGISTRATION, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(0).getAppDestination().toString());
assertEquals(DEFAULT_EVENT_ID, result.get(0).getSourceEventId());
assertEquals(999, result.get(0).getSourcePriority());
assertEquals(DEFAULT_EXPIRY, result.get(0).getExpiry());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(1).getTopOrigin().toString());
- assertEquals(ALT_REGISTRATION, result.get(1).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(1).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(1).getAppDestination().toString());
assertEquals(ALT_EVENT_ID, result.get(1).getSourceEventId());
assertEquals(888, result.get(1).getSourcePriority());
assertEquals(ALT_EXPIRY, result.get(1).getExpiry());
assertEquals(DEFAULT_TOP_ORIGIN, result.get(2).getTopOrigin().toString());
- assertEquals(ALT_REGISTRATION, result.get(2).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(2).getEnrollmentId());
assertEquals(DEFAULT_DESTINATION, result.get(2).getAppDestination().toString());
assertEquals(777, result.get(2).getSourceEventId());
assertEquals(777, result.get(2).getSourcePriority());
@@ -745,7 +791,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("android-app://com.myapps", result.get(0).getAppDestination().toString());
assertEquals(123, result.get(0).getSourcePriority());
assertEquals(456789, result.get(0).getExpiry());
@@ -799,7 +845,7 @@ public final class SourceFetcherTest {
List<SourceRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(
new JSONArray(
"[{\"id\" : \"campaignCounts\", \"key_piece\" : \"0x159\"},{\"id\""
@@ -845,7 +891,7 @@ public final class SourceFetcherTest {
.setAppDestination(Uri.parse(DEFAULT_DESTINATION))
.setExpiry(MAX_REPORTING_REGISTER_SOURCE_EXPIRATION_IN_SECONDS)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.setSourceEventId(EVENT_ID_1)
.setSourcePriority(0)
.setDebugKey(DEBUG_KEY)
@@ -855,7 +901,7 @@ public final class SourceFetcherTest {
.setAppDestination(Uri.parse(DEFAULT_DESTINATION))
.setExpiry(MAX_REPORTING_REGISTER_SOURCE_EXPIRATION_IN_SECONDS)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_2)
+ .setEnrollmentId(ENROLLMENT_ID)
.setSourceEventId(EVENT_ID_2)
.setSourcePriority(0)
.build();
@@ -923,7 +969,7 @@ public final class SourceFetcherTest {
.setAppDestination(Uri.parse(DEFAULT_DESTINATION))
.setExpiry(MAX_REPORTING_REGISTER_SOURCE_EXPIRATION_IN_SECONDS)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_2)
+ .setEnrollmentId(ENROLLMENT_ID)
.setSourceEventId(EVENT_ID_2)
.setSourcePriority(0)
.build();
@@ -1025,7 +1071,7 @@ public final class SourceFetcherTest {
.setAggregateFilterData(filterData)
.setAggregateSource(new JSONArray(aggregateSource).toString())
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
@@ -1084,7 +1130,7 @@ public final class SourceFetcherTest {
.setAggregateFilterData(filterData)
.setAggregateSource(new JSONArray(aggregateSource).toString())
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
@@ -1221,7 +1267,7 @@ public final class SourceFetcherTest {
.setExpiry(456789)
.setSourceEventId(987654321)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
@@ -1273,7 +1319,7 @@ public final class SourceFetcherTest {
.setExpiry(456789)
.setSourceEventId(987654321)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
@@ -1323,7 +1369,7 @@ public final class SourceFetcherTest {
.setExpiry(456789)
.setSourceEventId(987654321)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
@@ -1377,7 +1423,7 @@ public final class SourceFetcherTest {
.setAppDestination(Uri.parse(DEFAULT_DESTINATION))
.setExpiry(MAX_REPORTING_REGISTER_SOURCE_EXPIRATION_IN_SECONDS)
.setTopOrigin(Uri.parse(DEFAULT_TOP_ORIGIN))
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.setSourceEventId(EVENT_ID_1)
.setSourcePriority(0)
.build();
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceRegistrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceRegistrationTest.java
index fe95da65d0..e944fef627 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceRegistrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/SourceRegistrationTest.java
@@ -34,14 +34,14 @@ import org.junit.Test;
@SmallTest
public final class SourceRegistrationTest {
private static final Uri TOP_ORIGIN = Uri.parse("https://foo.com");
- private static final Uri REGISTRATION_URI = Uri.parse("https://bar.com");
+ private static final String ENROLLMENT_ID = "enrollment-id";
private static final Long DEBUG_KEY = 2376843L;
private SourceRegistration createExampleResponse() {
return new SourceRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.setAppDestination(Uri.parse("android-app://baz.com"))
.setSourceEventId(1234567)
.setExpiry(2345678)
@@ -56,7 +56,7 @@ public final class SourceRegistrationTest {
void verifyExampleResponse(SourceRegistration response) {
assertEquals("https://foo.com", response.getTopOrigin().toString());
- assertEquals("https://bar.com", response.getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, response.getEnrollmentId());
assertEquals("android-app://baz.com", response.getAppDestination().toString());
assertEquals(1234567, response.getSourceEventId());
assertEquals(2345678, response.getExpiry());
@@ -81,11 +81,11 @@ public final class SourceRegistrationTest {
SourceRegistration response =
new SourceRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.setAppDestination(destination)
.build();
assertEquals(TOP_ORIGIN, response.getTopOrigin());
- assertEquals(REGISTRATION_URI, response.getRegistrationUri());
+ assertEquals(ENROLLMENT_ID, response.getEnrollmentId());
assertEquals(destination, response.getAppDestination());
assertNull(response.getWebDestination());
assertEquals(0, response.getSourceEventId());
@@ -101,11 +101,11 @@ public final class SourceRegistrationTest {
SourceRegistration response =
new SourceRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.setWebDestination(destination)
.build();
assertEquals(TOP_ORIGIN, response.getTopOrigin());
- assertEquals(REGISTRATION_URI, response.getRegistrationUri());
+ assertEquals(ENROLLMENT_ID, response.getEnrollmentId());
assertEquals(destination, response.getWebDestination());
assertNull(response.getAppDestination());
assertEquals(0, response.getSourceEventId());
@@ -122,12 +122,12 @@ public final class SourceRegistrationTest {
SourceRegistration response =
new SourceRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.setAppDestination(destination)
.setWebDestination(webDestination)
.build();
assertEquals(TOP_ORIGIN, response.getTopOrigin());
- assertEquals(REGISTRATION_URI, response.getRegistrationUri());
+ assertEquals(ENROLLMENT_ID, response.getEnrollmentId());
assertEquals(webDestination, response.getWebDestination());
assertEquals(destination, response.getAppDestination());
assertEquals(0, response.getSourceEventId());
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerFetcherTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerFetcherTest.java
index 79e6ee096c..4d8312c276 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerFetcherTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerFetcherTest.java
@@ -37,6 +37,9 @@ import android.net.Uri;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
+import com.android.adservices.data.enrollment.EnrollmentDao;
+import com.android.adservices.service.enrollment.EnrollmentData;
+
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -63,6 +66,10 @@ import javax.net.ssl.HttpsURLConnection;
@SmallTest
public final class TriggerFetcherTest {
private static final String TRIGGER_URI = "https://foo.com";
+ private static final String ENROLLMENT_ID = "enrollment-id";
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setEnrollmentId("enrollment-id")
+ .build();
private static final String TOP_ORIGIN = "https://baz.com";
private static final long TRIGGER_DATA = 7;
private static final long PRIORITY = 1;
@@ -118,11 +125,15 @@ public final class TriggerFetcherTest {
@Mock HttpsURLConnection mUrlConnection1;
@Mock HttpsURLConnection mUrlConnection2;
@Mock AdIdPermissionFetcher mAdIdPermissionFetcher;
+ @Mock EnrollmentDao mEnrollmentDao;
@Before
public void setup() {
- mFetcher = spy(new TriggerFetcher(mAdIdPermissionFetcher));
+ mFetcher = spy(new TriggerFetcher(mEnrollmentDao, mAdIdPermissionFetcher));
when(mAdIdPermissionFetcher.isAdIdPermissionEnabled()).thenReturn(false);
+ // For convenience, return the same enrollment-ID since we're using many arbitrary
+ // registration URIs and not yet enforcing uniqueness of enrollment.
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(any())).thenReturn(ENROLLMENT);
}
@Test
@@ -140,12 +151,28 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(TRIGGER_URI, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(new JSONArray(EVENT_TRIGGERS_1).toString(), result.get(0).getEventTriggers());
verify(mUrlConnection).setRequestMethod("POST");
}
@Test
+ public void testBasicTriggerRequest_failsWhenNotEnrolled() throws Exception {
+ RegistrationRequest request = buildRequest(TRIGGER_URI, TOP_ORIGIN);
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(any())).thenReturn(null);
+ doReturn(mUrlConnection).when(mFetcher).openUrl(new URL(TRIGGER_URI));
+ when(mUrlConnection.getResponseCode()).thenReturn(200);
+ when(mUrlConnection.getHeaderFields())
+ .thenReturn(
+ Map.of(
+ "Attribution-Reporting-Register-Trigger",
+ List.of("{" + "'event_trigger_data':" + EVENT_TRIGGERS_1 + "}")));
+ Optional<List<TriggerRegistration>> fetch = mFetcher.fetchTrigger(request);
+ assertFalse(fetch.isPresent());
+ verify(mFetcher, never()).openUrl(any());
+ }
+
+ @Test
public void testBasicTriggerRequestWithDebugKey() throws Exception {
RegistrationRequest request = buildRequest(TRIGGER_URI, TOP_ORIGIN);
doReturn(mUrlConnection).when(mFetcher).openUrl(new URL(TRIGGER_URI));
@@ -171,7 +198,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(TRIGGER_URI, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(new JSONArray(EVENT_TRIGGERS_1).toString(), result.get(0).getEventTriggers());
assertEquals(DEBUG_KEY, result.get(0).getDebugKey()); // todo
@@ -204,7 +231,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(TRIGGER_URI, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(new JSONArray(EVENT_TRIGGERS_1).toString(), result.get(0).getEventTriggers());
assertNull(result.get(0).getDebugKey());
@@ -259,7 +286,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(TRIGGER_URI, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals("[{}]", result.get(0).getEventTriggers());
verify(mUrlConnection).setRequestMethod("POST");
}
@@ -291,7 +318,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals(TOP_ORIGIN, result.get(0).getTopOrigin().toString());
- assertEquals(TRIGGER_URI, result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(new JSONArray(EVENT_TRIGGERS_1).toString(), result.get(0).getEventTriggers());
verify(mUrlConnection, times(2)).setRequestMethod("POST");
}
@@ -337,7 +364,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(
new JSONArray(aggregatable_trigger_data).toString(),
result.get(0).getAggregateTriggerData());
@@ -390,7 +417,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(
new JSONObject(aggregatable_values).toString(), result.get(0).getAggregateValues());
verify(mUrlConnection).setRequestMethod("POST");
@@ -440,7 +467,7 @@ public final class TriggerFetcherTest {
List<TriggerRegistration> result = fetch.get();
assertEquals(1, result.size());
assertEquals("https://baz.com", result.get(0).getTopOrigin().toString());
- assertEquals("https://foo.com", result.get(0).getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, result.get(0).getEnrollmentId());
assertEquals(new JSONObject(filters).toString(), result.get(0).getFilters());
verify(mUrlConnection).setRequestMethod("POST");
}
@@ -452,14 +479,14 @@ public final class TriggerFetcherTest {
new TriggerRegistration.Builder()
.setTopOrigin(Uri.parse(TOP_ORIGIN))
.setEventTriggers(new JSONArray(EVENT_TRIGGERS_1).toString())
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.setDebugKey(DEBUG_KEY)
.build();
TriggerRegistration expectedResult2 =
new TriggerRegistration.Builder()
.setTopOrigin(Uri.parse(TOP_ORIGIN))
.setEventTriggers(new JSONArray(EVENT_TRIGGERS_2).toString())
- .setRegistrationUri(REGISTRATION_URI_2)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
WebTriggerRegistrationRequest request =
@@ -541,7 +568,7 @@ public final class TriggerFetcherTest {
new TriggerRegistration.Builder()
.setTopOrigin(Uri.parse(TOP_ORIGIN))
.setEventTriggers(new JSONArray(EVENT_TRIGGERS_1).toString())
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.setFilters(new JSONObject(filters).toString())
.setAggregateTriggerData(new JSONArray(aggregatableTriggerData).toString())
.setAggregateValues(new JSONObject(aggregatableValues).toString())
@@ -578,7 +605,7 @@ public final class TriggerFetcherTest {
new TriggerRegistration.Builder()
.setTopOrigin(Uri.parse(TOP_ORIGIN))
.setEventTriggers(new JSONArray(EVENT_TRIGGERS_1).toString())
- .setRegistrationUri(REGISTRATION_URI_1)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
// Execution
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerRegistrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerRegistrationTest.java
index 7b7a163714..d42f96fc6d 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerRegistrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/TriggerRegistrationTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
@SmallTest
public final class TriggerRegistrationTest {
private static final Uri TOP_ORIGIN = Uri.parse("https://foo.com");
- private static final Uri REGISTRATION_URI = Uri.parse("https://bar.com");
+ private static final String ENROLLMENT_ID = "enrollment-id";
private static final String TOP_LEVEL_FILTERS_JSON_STRING =
"{\n"
+ " \"key_1\": [\"value_1\", \"value_2\"],\n"
@@ -60,7 +60,7 @@ public final class TriggerRegistrationTest {
private TriggerRegistration createExampleResponse() {
return new TriggerRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.setEventTriggers(EVENT_TRIGGERS)
.setAggregateTriggerData(AGGREGATE_TRIGGER_DATA)
.setAggregateValues("{\"campaignCounts\":32768,\"geoValue\":1644}")
@@ -71,7 +71,7 @@ public final class TriggerRegistrationTest {
void verifyExampleResponse(TriggerRegistration triggerRegistration) {
assertEquals("https://foo.com", triggerRegistration.getTopOrigin().toString());
- assertEquals("https://bar.com", triggerRegistration.getRegistrationUri().toString());
+ assertEquals(ENROLLMENT_ID, triggerRegistration.getEnrollmentId());
assertEquals(EVENT_TRIGGERS, triggerRegistration.getEventTriggers());
assertEquals(AGGREGATE_TRIGGER_DATA, triggerRegistration.getAggregateTriggerData());
assertEquals(
@@ -91,10 +91,10 @@ public final class TriggerRegistrationTest {
TriggerRegistration response =
new TriggerRegistration.Builder()
.setTopOrigin(TOP_ORIGIN)
- .setRegistrationUri(REGISTRATION_URI)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
assertEquals(TOP_ORIGIN, response.getTopOrigin());
- assertEquals(REGISTRATION_URI, response.getRegistrationUri());
+ assertEquals(ENROLLMENT_ID, response.getEnrollmentId());
assertNull(response.getEventTriggers());
assertNull(response.getAggregateTriggerData());
assertNull(response.getAggregateValues());
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerIntegrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerIntegrationTest.java
index c95ed3cffd..09e4a71b5e 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerIntegrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerIntegrationTest.java
@@ -19,10 +19,12 @@ package com.android.adservices.service.measurement.reporting;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.AbstractDbIntegrationTest;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.data.measurement.DbState;
+import com.android.adservices.service.enrollment.EnrollmentData;
import com.android.adservices.service.measurement.aggregation.AggregateCryptoFixture;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKey;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKeyManager;
@@ -45,7 +47,11 @@ import java.util.Objects;
/** Integration tests for {@link AggregateReportingJobHandler} */
@RunWith(Parameterized.class)
public class AggregateReportingJobHandlerIntegrationTest extends AbstractDbIntegrationTest {
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setAttributionReportingUrl(List.of("https://ad-tech.com"))
+ .build();
private final JSONObject mParam;
+ private final EnrollmentDao mEnrollmentDao;
@Parameterized.Parameters(name = "{3}")
public static Collection<Object[]> data() throws IOException, JSONException {
@@ -60,6 +66,7 @@ public class AggregateReportingJobHandlerIntegrationTest extends AbstractDbInteg
DbState input, DbState output, JSONObject param, String name) {
super(input, output);
mParam = param;
+ mEnrollmentDao = Mockito.mock(EnrollmentDao.class);
}
public enum Action {
@@ -71,6 +78,7 @@ public class AggregateReportingJobHandlerIntegrationTest extends AbstractDbInteg
public void runActionToTest() {
final Integer returnCode = (Integer) get("responseCode");
final String action = (String) get("action");
+ final boolean isEnrolled = get("notEnrolled") == null;
AggregateEncryptionKeyManager mockKeyManager = mock(AggregateEncryptionKeyManager.class);
ArgumentCaptor<Integer> captorNumberOfKeys = ArgumentCaptor.forClass(Integer.class);
@@ -83,9 +91,12 @@ public class AggregateReportingJobHandlerIntegrationTest extends AbstractDbInteg
}
return keys;
});
+ Mockito.doReturn(isEnrolled ? ENROLLMENT : null)
+ .when(mEnrollmentDao).getEnrollmentData(Mockito.any());
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
AggregateReportingJobHandler spyReportingService =
- Mockito.spy(new AggregateReportingJobHandler(datastoreManager, mockKeyManager));
+ Mockito.spy(new AggregateReportingJobHandler(
+ mEnrollmentDao, datastoreManager, mockKeyManager));
try {
Mockito.doReturn(returnCode)
.when(spyReportingService)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerTest.java
index 591d3c3b74..a08d1bea45 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerTest.java
@@ -32,10 +32,12 @@ import android.net.Uri;
import androidx.test.core.app.ApplicationProvider;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreException;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.IMeasurementDao;
import com.android.adservices.data.measurement.ITransaction;
+import com.android.adservices.service.enrollment.EnrollmentData;
import com.android.adservices.service.measurement.aggregation.AggregateCryptoFixture;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKey;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKeyManager;
@@ -61,6 +63,11 @@ import java.util.List;
/** Unit test for {@link AggregateReportingJobHandler} */
@RunWith(MockitoJUnitRunner.class)
public class AggregateReportingJobHandlerTest {
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setAttributionReportingUrl(List.of("https://ad-tech.com"))
+ .build();
+ private static final Uri REPORTING_URI = Uri.parse("https://ad-tech.com");
+ private static final String ENROLLMENT_ID = "enrollment-id";
private static final String CLEARTEXT_PAYLOAD =
"{\"operation\":\"histogram\",\"data\":[{\"bucket\":1,\"value\":2}]}";
@@ -71,6 +78,8 @@ public class AggregateReportingJobHandlerTest {
@Mock ITransaction mTransaction;
+ @Mock EnrollmentDao mEnrollmentDao;
+
AggregateReportingJobHandler mAggregateReportingJobHandler;
AggregateReportingJobHandler mSpyAggregateReportingJobHandler;
@@ -100,9 +109,10 @@ public class AggregateReportingJobHandlerTest {
}
return keys;
});
+ when(mEnrollmentDao.getEnrollmentData(any())).thenReturn(ENROLLMENT);
mDatastoreManager = new FakeDatasoreManager();
- mAggregateReportingJobHandler =
- new AggregateReportingJobHandler(mDatastoreManager, mockKeyManager);
+ mAggregateReportingJobHandler = new AggregateReportingJobHandler(
+ mEnrollmentDao, mDatastoreManager, mockKeyManager);
mSpyAggregateReportingJobHandler = Mockito.spy(mAggregateReportingJobHandler);
}
@@ -113,7 +123,7 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId")
.setStatus(AggregateReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
JSONObject aggregateReportBody =
new AggregateReportBody.Builder()
@@ -129,7 +139,7 @@ public class AggregateReportingJobHandlerTest {
.makeHttpPostRequest(Mockito.any(), Mockito.any());
doReturn(aggregateReportBody)
.when(mSpyAggregateReportingJobHandler)
- .createReportJsonPayload(Mockito.any(), Mockito.any());
+ .createReportJsonPayload(Mockito.any(), Mockito.any(), Mockito.any());
doNothing().when(mMeasurementDao).markAggregateReportDelivered(aggregateReport.getId());
Assert.assertEquals(
@@ -149,7 +159,7 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId")
.setStatus(AggregateReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
JSONObject aggregateReportBody =
new AggregateReportBody.Builder()
@@ -165,7 +175,7 @@ public class AggregateReportingJobHandlerTest {
.makeHttpPostRequest(Mockito.any(), Mockito.any());
doReturn(aggregateReportBody)
.when(mSpyAggregateReportingJobHandler)
- .createReportJsonPayload(Mockito.any(), Mockito.any());
+ .createReportJsonPayload(Mockito.any(), Mockito.any(), Mockito.any());
Assert.assertEquals(
AdServicesStatusUtils.STATUS_IO_ERROR,
@@ -183,8 +193,8 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId")
.setStatus(AggregateReport.Status.DELIVERED)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setDebugCleartextPayload(CLEARTEXT_PAYLOAD)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
when(mMeasurementDao.getAggregateReport(aggregateReport.getId()))
@@ -206,8 +216,8 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId1")
.setStatus(AggregateReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setScheduledReportTime(1000L)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
JSONObject aggregateReportBody1 =
new AggregateReportBody.Builder()
@@ -219,8 +229,8 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId2")
.setStatus(AggregateReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setScheduledReportTime(1100L)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
JSONObject aggregateReportBody2 =
new AggregateReportBody.Builder()
@@ -240,10 +250,12 @@ public class AggregateReportingJobHandlerTest {
.makeHttpPostRequest(Mockito.any(), Mockito.any());
doReturn(aggregateReportBody1)
.when(mSpyAggregateReportingJobHandler)
- .createReportJsonPayload(aggregateReport1, AggregateCryptoFixture.getKey());
+ .createReportJsonPayload(
+ aggregateReport1, REPORTING_URI, AggregateCryptoFixture.getKey());
doReturn(aggregateReportBody2)
.when(mSpyAggregateReportingJobHandler)
- .createReportJsonPayload(aggregateReport2, AggregateCryptoFixture.getKey());
+ .createReportJsonPayload(
+ aggregateReport2, REPORTING_URI, AggregateCryptoFixture.getKey());
Assert.assertTrue(
mSpyAggregateReportingJobHandler.performScheduledPendingReportsInWindow(
@@ -261,8 +273,8 @@ public class AggregateReportingJobHandlerTest {
new AggregateReport.Builder()
.setId("aggregateReportId1")
.setStatus(AggregateReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setScheduledReportTime(1000L)
+ .setEnrollmentId(ENROLLMENT_ID)
.build();
JSONObject aggregateReportBody =
new AggregateReportBody.Builder()
@@ -280,13 +292,14 @@ public class AggregateReportingJobHandlerTest {
.makeHttpPostRequest(Mockito.any(), Mockito.any());
doReturn(aggregateReportBody)
.when(mSpyAggregateReportingJobHandler)
- .createReportJsonPayload(aggregateReport, AggregateCryptoFixture.getKey());
+ .createReportJsonPayload(
+ aggregateReport, REPORTING_URI, AggregateCryptoFixture.getKey());
AggregateEncryptionKeyManager mockKeyManager = mock(AggregateEncryptionKeyManager.class);
when(mockKeyManager.getAggregateEncryptionKeys(anyInt()))
.thenReturn(Collections.emptyList());
- mAggregateReportingJobHandler =
- new AggregateReportingJobHandler(new FakeDatasoreManager(), mockKeyManager);
+ mAggregateReportingJobHandler = new AggregateReportingJobHandler(
+ mEnrollmentDao, new FakeDatasoreManager(), mockKeyManager);
mSpyAggregateReportingJobHandler = Mockito.spy(mAggregateReportingJobHandler);
Assert.assertTrue(
@@ -295,4 +308,27 @@ public class AggregateReportingJobHandlerTest {
verify(mMeasurementDao, never()).markAggregateReportDelivered(any());
}
+
+ @Test
+ public void testSendReportWhenNotEnrolled() throws DatastoreException {
+ AggregateReport aggregateReport =
+ new AggregateReport.Builder()
+ .setId("aggregateReportId")
+ .setStatus(AggregateReport.Status.PENDING)
+ .setDebugCleartextPayload(CLEARTEXT_PAYLOAD)
+ .setEnrollmentId(ENROLLMENT_ID)
+ .build();
+
+ when(mMeasurementDao.getAggregateReport(aggregateReport.getId()))
+ .thenReturn(aggregateReport);
+ when(mEnrollmentDao.getEnrollmentData(any())).thenReturn(null);
+ Assert.assertEquals(
+ AdServicesStatusUtils.STATUS_INTERNAL_ERROR,
+ mSpyAggregateReportingJobHandler.performReport(
+ aggregateReport.getId(), AggregateCryptoFixture.getKey()));
+
+ verify(mMeasurementDao, never()).markAggregateReportDelivered(any());
+ verify(mTransaction, times(1)).begin();
+ verify(mTransaction, times(1)).end();
+ }
}
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerWrapper.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerWrapper.java
index b898f61d82..74375564e9 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerWrapper.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/AggregateReportingJobHandlerWrapper.java
@@ -23,6 +23,7 @@ import static org.mockito.Mockito.when;
import android.net.Uri;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.service.measurement.aggregation.AggregateCryptoFixture;
import com.android.adservices.service.measurement.aggregation.AggregateEncryptionKey;
@@ -42,8 +43,10 @@ import java.util.List;
*/
public class AggregateReportingJobHandlerWrapper {
public static Object[] spyPerformScheduledPendingReportsInWindow(
- DatastoreManager datastoreManager, long windowStartTime, long windowEndTime)
- throws IOException, JSONException {
+ EnrollmentDao enrollmentDao,
+ DatastoreManager datastoreManager,
+ long windowStartTime,
+ long windowEndTime) throws IOException, JSONException {
// Setup encryption manager to return valid public keys
ArgumentCaptor<Integer> captorNumberOfKeys = ArgumentCaptor.forClass(Integer.class);
AggregateEncryptionKeyManager mockEncryptionManager =
@@ -60,8 +63,8 @@ public class AggregateReportingJobHandlerWrapper {
// Set up aggregate reporting job handler spy
AggregateReportingJobHandler aggregateReportingJobHandler =
- Mockito.spy(
- new AggregateReportingJobHandler(datastoreManager, mockEncryptionManager));
+ Mockito.spy(new AggregateReportingJobHandler(
+ enrollmentDao, datastoreManager, mockEncryptionManager));
Mockito.doReturn(200).when(aggregateReportingJobHandler)
.makeHttpPostRequest(any(), any());
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerIntegrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerIntegrationTest.java
index 6f1dcbd811..76075c2913 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerIntegrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerIntegrationTest.java
@@ -16,10 +16,12 @@
package com.android.adservices.service.measurement.reporting;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.AbstractDbIntegrationTest;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.DatastoreManagerFactory;
import com.android.adservices.data.measurement.DbState;
+import com.android.adservices.service.enrollment.EnrollmentData;
import org.json.JSONException;
import org.json.JSONObject;
@@ -31,12 +33,17 @@ import org.mockito.Mockito;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
+import java.util.List;
import java.util.Objects;
/** Integration tests for {@link EventReportingJobHandler} */
@RunWith(Parameterized.class)
public class EventReportingJobHandlerIntegrationTest extends AbstractDbIntegrationTest {
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setAttributionReportingUrl(List.of("https://ad-tech.com"))
+ .build();
private final JSONObject mParam;
+ private final EnrollmentDao mEnrollmentDao;
@Parameterized.Parameters(name = "{3}")
public static Collection<Object[]> data() throws IOException, JSONException {
@@ -51,6 +58,7 @@ public class EventReportingJobHandlerIntegrationTest extends AbstractDbIntegrati
DbState input, DbState output, JSONObject param, String name) {
super(input, output);
mParam = param;
+ mEnrollmentDao = Mockito.mock(EnrollmentDao.class);
}
public enum Action {
@@ -62,10 +70,13 @@ public class EventReportingJobHandlerIntegrationTest extends AbstractDbIntegrati
public void runActionToTest() {
final Integer returnCode = (Integer) get("responseCode");
final String action = (String) get("action");
+ final boolean isEnrolled = get("notEnrolled") == null;
+ Mockito.doReturn(isEnrolled ? ENROLLMENT : null)
+ .when(mEnrollmentDao).getEnrollmentData(Mockito.any());
DatastoreManager datastoreManager = DatastoreManagerFactory.getDatastoreManager(sContext);
EventReportingJobHandler spyReportingService =
- Mockito.spy(new EventReportingJobHandler(datastoreManager));
+ Mockito.spy(new EventReportingJobHandler(mEnrollmentDao, datastoreManager));
try {
Mockito.doReturn(returnCode)
.when(spyReportingService)
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerTest.java
index 3edaaa25ff..bad6fefab0 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerTest.java
@@ -26,14 +26,15 @@ import static org.mockito.Mockito.when;
import android.adservices.common.AdServicesStatusUtils;
import android.content.Context;
-import android.net.Uri;
import androidx.test.core.app.ApplicationProvider;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreException;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.data.measurement.IMeasurementDao;
import com.android.adservices.data.measurement.ITransaction;
+import com.android.adservices.service.enrollment.EnrollmentData;
import com.android.adservices.service.measurement.EventReport;
import org.json.JSONException;
@@ -53,6 +54,9 @@ import java.util.List;
/** Unit test for {@link EventReportingJobHandler} */
@RunWith(MockitoJUnitRunner.class)
public class EventReportingJobHandlerTest {
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setAttributionReportingUrl(List.of("https://ad-tech.com"))
+ .build();
protected static final Context sContext = ApplicationProvider.getApplicationContext();
DatastoreManager mDatastoreManager;
@@ -61,11 +65,12 @@ public class EventReportingJobHandlerTest {
@Mock ITransaction mTransaction;
+ @Mock EnrollmentDao mEnrollmentDao;
+
EventReportingJobHandler mEventReportingJobHandler;
EventReportingJobHandler mSpyEventReportingJobHandler;
class FakeDatasoreManager extends DatastoreManager {
-
@Override
public ITransaction createNewTransaction() {
return mTransaction;
@@ -80,7 +85,8 @@ public class EventReportingJobHandlerTest {
@Before
public void setUp() {
mDatastoreManager = new FakeDatasoreManager();
- mEventReportingJobHandler = new EventReportingJobHandler(mDatastoreManager);
+ when(mEnrollmentDao.getEnrollmentData(any())).thenReturn(ENROLLMENT);
+ mEventReportingJobHandler = new EventReportingJobHandler(mEnrollmentDao, mDatastoreManager);
mSpyEventReportingJobHandler = Mockito.spy(mEventReportingJobHandler);
}
@@ -91,7 +97,6 @@ public class EventReportingJobHandlerTest {
new EventReport.Builder()
.setId("eventReportId")
.setStatus(EventReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.build();
JSONObject eventReportPayload =
new EventReportPayload.Builder().setReportId(eventReport.getId()).build().toJson();
@@ -121,7 +126,6 @@ public class EventReportingJobHandlerTest {
new EventReport.Builder()
.setId("eventReportId")
.setStatus(EventReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.build();
JSONObject eventReportPayload =
new EventReportPayload.Builder().setReportId(eventReport.getId()).build().toJson();
@@ -149,7 +153,6 @@ public class EventReportingJobHandlerTest {
new EventReport.Builder()
.setId("eventReportId")
.setStatus(EventReport.Status.DELIVERED)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.build();
when(mMeasurementDao.getEventReport(eventReport.getId())).thenReturn(eventReport);
@@ -169,7 +172,6 @@ public class EventReportingJobHandlerTest {
new EventReport.Builder()
.setId("eventReport1")
.setStatus(EventReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setReportTime(1000L)
.build();
JSONObject eventReportPayload1 =
@@ -178,7 +180,6 @@ public class EventReportingJobHandlerTest {
new EventReport.Builder()
.setId("eventReport2")
.setStatus(EventReport.Status.PENDING)
- .setAdTechDomain(Uri.parse("https://adtech.domain"))
.setReportTime(1100L)
.build();
JSONObject eventReportPayload2 =
@@ -205,4 +206,23 @@ public class EventReportingJobHandlerTest {
verify(mTransaction, times(5)).begin();
verify(mTransaction, times(5)).end();
}
+
+ @Test
+ public void testSendReportWhenNotEnrolled() throws DatastoreException {
+ EventReport eventReport =
+ new EventReport.Builder()
+ .setId("eventReportId")
+ .setStatus(EventReport.Status.PENDING)
+ .build();
+
+ when(mEnrollmentDao.getEnrollmentData(any())).thenReturn(null);
+ when(mMeasurementDao.getEventReport(eventReport.getId())).thenReturn(eventReport);
+ Assert.assertEquals(
+ AdServicesStatusUtils.STATUS_INTERNAL_ERROR,
+ mSpyEventReportingJobHandler.performReport(eventReport.getId()));
+
+ verify(mMeasurementDao, never()).markEventReportDelivered(any());
+ verify(mTransaction, times(1)).begin();
+ verify(mTransaction, times(1)).end();
+ }
}
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerWrapper.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerWrapper.java
index 5c844bdbfd..3316d68aa8 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerWrapper.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/EventReportingJobHandlerWrapper.java
@@ -22,6 +22,7 @@ import static org.mockito.Mockito.verify;
import android.net.Uri;
+import com.android.adservices.data.enrollment.EnrollmentDao;
import com.android.adservices.data.measurement.DatastoreManager;
import com.android.adservices.service.measurement.EventReport;
@@ -37,11 +38,13 @@ import java.io.IOException;
*/
public class EventReportingJobHandlerWrapper {
public static Object[] spyPerformScheduledPendingReportsInWindow(
- DatastoreManager datastoreManager, long windowStartTime, long windowEndTime)
- throws IOException, JSONException {
+ EnrollmentDao enrollmentDao,
+ DatastoreManager datastoreManager,
+ long windowStartTime,
+ long windowEndTime) throws IOException, JSONException {
// Set up event reporting job handler spy
EventReportingJobHandler eventReportingJobHandler =
- Mockito.spy(new EventReportingJobHandler(datastoreManager));
+ Mockito.spy(new EventReportingJobHandler(enrollmentDao, datastoreManager));
Mockito.doReturn(200).when(eventReportingJobHandler)
.makeHttpPostRequest(any(), any());
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/EnrollmentTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/EnrollmentTest.java
new file mode 100644
index 0000000000..ffe8b06f02
--- /dev/null
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/EnrollmentTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.adservices.service.measurement.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+import android.net.Uri;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.adservices.data.enrollment.EnrollmentDao;
+import com.android.adservices.service.enrollment.EnrollmentData;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.List;
+import java.util.Optional;
+
+@SmallTest
+public final class EnrollmentTest {
+
+ private static final Uri REGISTRATION_URI = Uri.parse("https://ad-tech.com/register");
+ private static final String ENROLLMENT_ID = "enrollment-id";
+ private static final EnrollmentData ENROLLMENT = new EnrollmentData.Builder()
+ .setEnrollmentId("enrollment-id")
+ .setAttributionReportingUrl(List.of("https://origin1.com", "https://origin2.com"))
+ .build();
+ @Mock private EnrollmentDao mEnrollmentDao;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testMaybeGetEnrollmentId_enrollmentDataNull() {
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(eq(REGISTRATION_URI.toString())))
+ .thenReturn(null);
+ assertEquals(
+ Optional.empty(),
+ Enrollment.maybeGetEnrollmentId(REGISTRATION_URI, mEnrollmentDao));
+ }
+
+ @Test
+ public void testMaybeGetEnrollmentId_enrollmentDataNonNull() {
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(eq(REGISTRATION_URI.toString())))
+ .thenReturn(ENROLLMENT);
+ assertEquals(
+ Optional.of(ENROLLMENT.getEnrollmentId()),
+ Enrollment.maybeGetEnrollmentId(REGISTRATION_URI, mEnrollmentDao));
+ }
+
+ @Test
+ public void testMaybeGetReportingOrigin_success() {
+ when(mEnrollmentDao.getEnrollmentData(eq(ENROLLMENT_ID))).thenReturn(ENROLLMENT);
+ assertEquals(
+ Optional.of(Uri.parse("https://origin1.com")),
+ Enrollment.maybeGetReportingOrigin(ENROLLMENT_ID, mEnrollmentDao));
+ }
+
+ @Test
+ public void testMaybeGetReportingOrigin_enrollmentDataNull() {
+ when(mEnrollmentDao.getEnrollmentData(eq(ENROLLMENT_ID))).thenReturn(null);
+ assertEquals(
+ Optional.empty(),
+ Enrollment.maybeGetReportingOrigin(ENROLLMENT_ID, mEnrollmentDao));
+ }
+
+ @Test
+ public void testMaybeGetReportingOrigin_attributionReportingUrlEmpty() {
+ EnrollmentData enrollment = new EnrollmentData.Builder().build();
+ when(mEnrollmentDao.getEnrollmentDataFromMeasurementUrl(eq(ENROLLMENT_ID)))
+ .thenReturn(enrollment);
+ assertEquals(
+ Optional.empty(),
+ Enrollment.maybeGetReportingOrigin(ENROLLMENT_ID, mEnrollmentDao));
+ }
+}