[First Party Sets UI] Deprecate duplicate UI facing preference
The UI and FPS backends each had their own preference to represent the
state of FPS.
This CL deprecates the front-end preference, and re-connects it to the
FPS backend pref, which had so far only been used to apply policy.
Using the same pref object for policy, and user, control is standard
practice, as a single pref object can encapsulate both levels of
control.
The user initialization logic, and associated pref, remain, but now
affect the pref used by the FPS backend.
Bug: 1349370
Change-Id: I9ed6a2a7205718c78e8f6e2817076eabff9fa6fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3871264
Reviewed-by: Demetrios Papadopoulos <[email protected]>
Commit-Queue: Theodore Olsauskas-Warren <[email protected]>
Reviewed-by: Shuran Huang <[email protected]>
Reviewed-by: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1044436}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 984cafb..9611537 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -767,6 +767,10 @@
constexpr char kUsersLastInputMethod[] = "UsersLRUInputMethod";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 09/2022.
+const char kPrivacySandboxFirstPartySetsDataAccessAllowed[] =
+ "privacy_sandbox.first_party_sets_data_access_allowed";
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1010,6 +1014,10 @@
// Deprecated 08/2022.
registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false);
#endif
+
+ // Deprecated 09/2022
+ registry->RegisterBooleanPref(kPrivacySandboxFirstPartySetsDataAccessAllowed,
+ true);
}
} // namespace
@@ -1980,6 +1988,9 @@
profile_prefs->ClearPref(prefs::kUsesSystemThemeDeprecated);
#endif
+ // Added 09/2022.
+ profile_prefs->ClearPref(kPrivacySandboxFirstPartySetsDataAccessAllowed);
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS