Remove OptimizationGuideFetchingEnabled policy in favor of ComponentUpdatesEnabled policy
This guards ML model downloads behind the ComponentUpdatesEnabled policy as instructed by Chrome Enterprise team and also removes fetching of page load metadata (which is already gated by the Make Searches and Browsing Better) from a specific enterprise policy
Bug: 1320421
Change-Id: I12ca5ef91181a0fbc99db6dcd7cc68a50147c144
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3612141
Reviewed-by: Tarun Bansal <[email protected]>
Reviewed-by: Owen Min <[email protected]>
Reviewed-by: Sorin Jianu <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Commit-Queue: Sophie Chang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#997870}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index a2f2393..6a49e31 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -770,6 +770,10 @@
const char kTimeOnOobe[] = "settings.time_on_oobe";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 04/2022.
+const char kOptimizationGuideRemoteFetchingEnabled[] =
+ "optimization_guide.remote_fetching_enabled";
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1012,6 +1016,8 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterIntegerPref(kTimeOnOobe, 0);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+ registry->RegisterBooleanPref(kOptimizationGuideRemoteFetchingEnabled, true);
}
} // namespace
@@ -1969,6 +1975,9 @@
profile_prefs->ClearPref(kTimeOnOobe);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+ // Added 04/2022
+ profile_prefs->ClearPref(kOptimizationGuideRemoteFetchingEnabled);
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS