Remove attribution scopes feature flag
This has been enabled by default since M130. Change-Id: Ib99063a69bc3d352e87d69db9a3e48f3fa98aa84 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6147814 Reviewed-by: Thomas Quintanilla <tquintanilla@chromium.org> Reviewed-by: Dominic Farolino <dom@chromium.org> Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org> Reviewed-by: Nan Lin <linnan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1402367}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
bfaa362cc2
commit
d0e8670e14
components/attribution_reporting
features.ccfeatures.hsource_registration.ccsource_registration_unittest.cctrigger_registration.cctrigger_registration_unittest.cc
content
browser
attribution_reporting
test
data
attribution_reporting
interop
attribution_scopes_basic.jsonattribution_scopes_different_max_event_states.jsonattribution_scopes_max_event_states_limit.jsonattribution_scopes_multiple_trigger_scopes.jsonattribution_scopes_navigation_limit_no_scopes.jsonattribution_scopes_navigation_limit_with_scopes.jsonattribution_scopes_null_scopes_incoming_data_interaction.jsonattribution_scopes_null_scopes_removes_data.jsonattribution_scopes_older_scopes_removed.jsonattribution_scopes_older_scopes_removed_2.jsonattribution_scopes_parsing_failures.jsonattribution_scopes_smaller_scope_limit.jsonsource_registration_limits.json
third_party/blink/web_tests
@ -13,10 +13,6 @@ BASE_FEATURE(kConversionMeasurement,
|
||||
"ConversionMeasurement",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kAttributionScopes,
|
||||
"AttributionScopes",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kAttributionAggregatableNamedBudgets,
|
||||
"AttributionAggregatableNamedBudgets",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
@ -14,9 +14,6 @@ namespace attribution_reporting::features {
|
||||
COMPONENT_EXPORT(ATTRIBUTION_REPORTING_FEATURES)
|
||||
BASE_DECLARE_FEATURE(kConversionMeasurement);
|
||||
|
||||
COMPONENT_EXPORT(ATTRIBUTION_REPORTING_FEATURES)
|
||||
BASE_DECLARE_FEATURE(kAttributionScopes);
|
||||
|
||||
COMPONENT_EXPORT(ATTRIBUTION_REPORTING_FEATURES)
|
||||
BASE_DECLARE_FEATURE(kAttributionAggregatableNamedBudgets);
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/time/time.h"
|
||||
@ -26,7 +25,6 @@
|
||||
#include "components/attribution_reporting/destination_set.h"
|
||||
#include "components/attribution_reporting/event_level_epsilon.h"
|
||||
#include "components/attribution_reporting/event_report_windows.h"
|
||||
#include "components/attribution_reporting/features.h"
|
||||
#include "components/attribution_reporting/filters.h"
|
||||
#include "components/attribution_reporting/parsing_utils.h"
|
||||
#include "components/attribution_reporting/source_registration_error.mojom.h"
|
||||
@ -165,9 +163,7 @@ base::expected<SourceRegistration, SourceRegistrationError> ParseDict(
|
||||
AggregatableNamedBudgetDefs::FromJSON(
|
||||
registration.Find(kAggregatableNamedBudgets)));
|
||||
|
||||
if (base::Value* scopes_value = registration.Find(kAttributionScopes);
|
||||
scopes_value &&
|
||||
base::FeatureList::IsEnabled(features::kAttributionScopes)) {
|
||||
if (base::Value* scopes_value = registration.Find(kAttributionScopes)) {
|
||||
ASSIGN_OR_RETURN(result.attribution_scopes_data,
|
||||
AttributionScopesData::FromJSON(*scopes_value));
|
||||
}
|
||||
@ -263,8 +259,7 @@ base::Value::Dict SourceRegistration::ToJson() const {
|
||||
|
||||
aggregatable_debug_reporting_config.Serialize(dict);
|
||||
|
||||
if (attribution_scopes_data.has_value() &&
|
||||
base::FeatureList::IsEnabled(features::kAttributionScopes)) {
|
||||
if (attribution_scopes_data.has_value()) {
|
||||
dict.Set(kAttributionScopes, attribution_scopes_data->ToJson());
|
||||
}
|
||||
|
||||
|
@ -784,9 +784,6 @@ TEST(SourceRegistrationTest, ParseAttributionScopesConfig) {
|
||||
},
|
||||
};
|
||||
|
||||
base::test::ScopedFeatureList scoped_feature_list(
|
||||
features::kAttributionScopes);
|
||||
|
||||
for (const auto& test_case : kTestCases) {
|
||||
base::HistogramTester histograms;
|
||||
SCOPED_TRACE(test_case.desc);
|
||||
|
@ -158,10 +158,8 @@ base::expected<TriggerRegistration, TriggerRegistrationError> ParseDict(
|
||||
registration.aggregatable_values,
|
||||
AggregatableValues::FromJSON(dict.Find(kAggregatableValues)));
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kAttributionScopes)) {
|
||||
ASSIGN_OR_RETURN(registration.attribution_scopes,
|
||||
AttributionScopesSet::FromJSON(dict));
|
||||
}
|
||||
ASSIGN_OR_RETURN(registration.attribution_scopes,
|
||||
AttributionScopesSet::FromJSON(dict));
|
||||
|
||||
registration.debug_key = ParseDebugKey(dict);
|
||||
registration.debug_reporting = ParseDebugReporting(dict);
|
||||
@ -260,9 +258,7 @@ base::Value::Dict TriggerRegistration::ToJson() const {
|
||||
|
||||
aggregatable_debug_reporting_config.Serialize(dict);
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kAttributionScopes)) {
|
||||
attribution_scopes.SerializeForTrigger(dict);
|
||||
}
|
||||
attribution_scopes.SerializeForTrigger(dict);
|
||||
|
||||
SerializeListIfNotEmpty(dict, kAggregatableNamedBudgets,
|
||||
aggregatable_named_budget_candidates);
|
||||
|
@ -579,9 +579,6 @@ TEST(TriggerRegistrationTest, ParseAttributionScopesConfig) {
|
||||
},
|
||||
};
|
||||
|
||||
base::test::ScopedFeatureList scoped_feature_list(
|
||||
features::kAttributionScopes);
|
||||
|
||||
for (const auto& test_case : kTestCases) {
|
||||
base::HistogramTester histograms;
|
||||
SCOPED_TRACE(test_case.desc);
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "components/attribution_reporting/destination_set.h"
|
||||
#include "components/attribution_reporting/event_report_windows.h"
|
||||
#include "components/attribution_reporting/event_trigger_data.h"
|
||||
#include "components/attribution_reporting/features.h"
|
||||
#include "components/attribution_reporting/filters.h"
|
||||
#include "components/attribution_reporting/max_event_level_reports.h"
|
||||
#include "components/attribution_reporting/os_registration.h"
|
||||
@ -867,10 +866,6 @@ TEST_F(AttributionDataHostManagerImplTest,
|
||||
|
||||
TEST_F(AttributionDataHostManagerImplTest,
|
||||
NavigationSourceUniqueScopesSet_NoScopes) {
|
||||
base::test::ScopedFeatureList scoped_feature_list;
|
||||
scoped_feature_list.InitAndEnableFeature(
|
||||
attribution_reporting::features::kAttributionScopes);
|
||||
|
||||
base::HistogramTester histograms;
|
||||
|
||||
const auto page_origin = *SuitableOrigin::Deserialize("https://page.example");
|
||||
@ -1002,10 +997,6 @@ TEST_F(AttributionDataHostManagerImplTest,
|
||||
|
||||
TEST_F(AttributionDataHostManagerImplTest,
|
||||
NavigationSourceUniqueScopesSet_WithScopes) {
|
||||
base::test::ScopedFeatureList scoped_feature_list;
|
||||
scoped_feature_list.InitAndEnableFeature(
|
||||
attribution_reporting::features::kAttributionScopes);
|
||||
|
||||
base::HistogramTester histograms;
|
||||
|
||||
const auto page_origin = *SuitableOrigin::Deserialize("https://page.example");
|
||||
|
@ -173,8 +173,6 @@ class AttributionInteropParser {
|
||||
bool required) && {
|
||||
interop_config.needs_cross_app_web =
|
||||
ParseBool(dict, "needs_cross_app_web").value_or(false);
|
||||
interop_config.needs_attribution_scopes =
|
||||
ParseBool(dict, "needs_attribution_scopes").value_or(false);
|
||||
interop_config.needs_aggregatable_named_budgets =
|
||||
ParseBool(dict, "needs_aggregatable_named_budgets").value_or(false);
|
||||
|
||||
|
@ -100,7 +100,6 @@ struct AttributionInteropConfig {
|
||||
double max_event_level_epsilon = 0;
|
||||
uint32_t max_trigger_state_cardinality = 0;
|
||||
bool needs_cross_app_web = false;
|
||||
bool needs_attribution_scopes = false;
|
||||
bool needs_aggregatable_named_budgets = false;
|
||||
std::vector<url::Origin> aggregation_coordinator_origins;
|
||||
|
||||
|
@ -447,11 +447,6 @@ RunAttributionInteropSimulation(
|
||||
scoped_api_state.emplace(AttributionOsLevelManager::ApiState::kEnabled);
|
||||
}
|
||||
|
||||
if (run.config.needs_attribution_scopes) {
|
||||
enabled_features.emplace_back(
|
||||
attribution_reporting::features::kAttributionScopes);
|
||||
}
|
||||
|
||||
if (run.config.needs_aggregatable_named_budgets) {
|
||||
enabled_features.emplace_back(
|
||||
attribution_reporting::features::kAttributionAggregatableNamedBudgets);
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Trigger only converts on source with matching scopes",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: attribution scopes -> ["1"], destinations -> [D1].
|
||||
|
3
content/test/data/attribution_reporting/interop/attribution_scopes_different_max_event_states.json
3
content/test/data/attribution_reporting/interop/attribution_scopes_different_max_event_states.json
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Test source deactivation logic based on different max event states for attribution scopes",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: max_event_states -> 10, attribution scopes-> ["1", "2"].
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Event source exceeding defined max event states",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Trigger with multiple attribution scopes",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: attribution scopes -> ["1"], destinations -> [D1].
|
||||
|
3
content/test/data/attribution_reporting/interop/attribution_scopes_navigation_limit_no_scopes.json
3
content/test/data/attribution_reporting/interop/attribution_scopes_navigation_limit_no_scopes.json
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "One unique scopes set per reporting origin per navigation - no scopes",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
{
|
||||
|
3
content/test/data/attribution_reporting/interop/attribution_scopes_navigation_limit_with_scopes.json
3
content/test/data/attribution_reporting/interop/attribution_scopes_navigation_limit_with_scopes.json
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "One unique scopes set per reporting origin per navigation - with scopes",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "A source with scope data set to null should be removed with incoming scope data.",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: attribution scopes -> [1] destinations -> [D1]
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"description": "An incoming source with null scopes should remove previous matching sources' scopes data.",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true,
|
||||
"max_destinations_per_rate_limit_window": "2",
|
||||
"max_destinations_per_rate_limit_window_reporting_site": "2"
|
||||
},
|
||||
@ -227,4 +226,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Tests that sources with outdated scopes are deleted.",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: attribution scopes-> ["1", "2", "3"] destinations -> [D1].
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Tests that sources with outdated scopes are deleted using expected scope ordering.",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Registrations with invalid attribution scopes fields are dropped",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// Scopes wrong type.
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"description": "Test that sources with a smaller attribution scope limit are deleted.",
|
||||
"api_config": {
|
||||
"needs_attribution_scopes": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
// S1: attribution scope limit -> 3 destinations -> [D1].
|
||||
@ -168,4 +165,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,7 @@
|
||||
"rate_limit_max_reporting_origins_per_source_reporting_site": "1",
|
||||
"max_destinations_per_rate_limit_window_reporting_site": "3",
|
||||
"max_destinations_per_rate_limit_window": "3",
|
||||
"rate_limit_max_source_registration_reporting_origins": "1",
|
||||
"needs_attribution_scopes": true
|
||||
"rate_limit_max_source_registration_reporting_origins": "1"
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
|
11
third_party/blink/web_tests/VirtualTestSuites
vendored
11
third_party/blink/web_tests/VirtualTestSuites
vendored
@ -215,19 +215,10 @@
|
||||
"platforms": ["Linux", "Mac", "Win"],
|
||||
"bases": ["http/tests/inspector-protocol/attribution-reporting"],
|
||||
"exclusive_tests": "ALL",
|
||||
"args": ["--enable-features=KeepAliveInBrowserMigration,AttributionReportingInBrowserMigration,AttributionScopes"],
|
||||
"args": ["--enable-features=KeepAliveInBrowserMigration,AttributionReportingInBrowserMigration"],
|
||||
"owners": ["linnan@chromium.org"],
|
||||
"expires": "Jul 2, 2025"
|
||||
},
|
||||
{
|
||||
"prefix": "attribution-reporting-attribution-scopes",
|
||||
"platforms": ["Linux", "Mac", "Win"],
|
||||
"bases": ["http/tests/inspector-protocol/attribution-reporting"],
|
||||
"exclusive_tests": "ALL",
|
||||
"args": ["--enable-features=AttributionScopes"],
|
||||
"owners": ["tquintanilla@chromium.org"],
|
||||
"expires": "Jul 2, 2025"
|
||||
},
|
||||
{
|
||||
"prefix": "attribution-reporting-debug-mode",
|
||||
"owners": ["johnidel@chromium.org"],
|
||||
|
@ -1,10 +0,0 @@
|
||||
# Tests for Attribution Reporting APIs with attribution scopes enabled
|
||||
|
||||
This virtual test suite covers a subset of Attribution Reporting APIs tests with
|
||||
the `AttributionScopes` flag enabled.
|
||||
|
||||
This flag enables a new flow where attribution registrations can include fields
|
||||
pertaining to attribution scopes, allowing for more finely-grained
|
||||
pre-attribution source filtering.
|
||||
|
||||
The suite only covers tests related to DevTools reporting.
|
Reference in New Issue
Block a user