[ua-ch] Remove Enterprise Policy for User Agent Client Hints
As noted in components/policy/resources/policy_templates.json, this
enterprise policy was intended for a short-term window to allow
enterprises to adapt to the new User Agent Client Hints, and was slated
for removal in Chrome 94.
The policy was removed following these instructions:
https://chromium.googlesource.com/chromium/src/+/main/docs/enterprise/add_new_policy.md#removing-support-for-a-policy.
The prefs were removed following these instructions:
https://chromium.googlesource.com/chromium/src/+/main/chrome/browser/prefs/README.md#deleting-an-old-pref.
The CL that added this enterprise policy was crrev.com/c/2248426.
Bug: 1217444
Change-Id: I8214cf509368ecfd8a9fb23d0c391b1710d18a5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3035821
Commit-Queue: Ali Beyad <[email protected]>
Reviewed-by: Anqing Zhao <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Reviewed-by: Mike West <[email protected]>
Reviewed-by: Aaron Tagliaboschi <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#903051}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 69791f0..4f0ff9f 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -636,6 +636,8 @@
const char kSuggestionsBlocklist[] = "suggestions.blacklist";
const char kSuggestionsData[] = "suggestions.data";
+const char kUserAgentClientHintsEnabled[] =
+ "policy.user_agent_client_hints_enabled";
#if BUILDFLAG(ENABLE_EXTENSIONS)
// Deprecated 07/2021.
@@ -674,6 +676,8 @@
registry->RegisterIntegerPref(kStabilityDebuggerPresent, 0);
registry->RegisterIntegerPref(kStabilityDebuggerNotPresent, 0);
+ registry->RegisterBooleanPref(kUserAgentClientHintsEnabled, true);
+
#if BUILDFLAG(ENABLE_EXTENSIONS)
registry->RegisterBooleanPref(kPinnedExtensionsMigrationComplete, false);
#endif
@@ -882,8 +886,6 @@
registry->RegisterBooleanPref(
policy::policy_prefs::kIntensiveWakeUpThrottlingEnabled, false);
registry->RegisterBooleanPref(
- policy::policy_prefs::kUserAgentClientHintsEnabled, true);
- registry->RegisterBooleanPref(
policy::policy_prefs::kTargetBlankImpliesNoOpener, true);
#if defined(OS_ANDROID)
registry->RegisterBooleanPref(policy::policy_prefs::kBackForwardCacheEnabled,
@@ -1417,6 +1419,9 @@
local_state->ClearPref(kPinnedExtensionsMigrationComplete);
#endif
+ // Added 07/2021
+ local_state->ClearPref(kUserAgentClientHintsEnabled);
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
}