dark_mode: Remove user pref `kColorModeThemed`
Remove this user pref as colors will always be themed, and users are
not able to change this setting. As the only entry point inside settings
has been removed at crbug/1320553.
Bug: 1300327
Change-Id: Ic8b223e85d5d08dd4d7804a9263a397839e7f7b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3653206
Commit-Queue: Min Chen <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Xiyuan Xia <[email protected]>
Reviewed-by: Zentaro Kavanagh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1006900}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 357a351..10ed54b 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -745,6 +745,11 @@
extern const char kAccountIdMigrationState[] = "account_id_migration_state";
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// Deprecated 05/2022.
+const char kColorModeThemed[] = "ash.dark_mode.color_mode_themed";
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -973,6 +978,10 @@
#if !BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterIntegerPref(kAccountIdMigrationState, 0);
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ registry->RegisterBooleanPref(kColorModeThemed, true);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
}
} // namespace
@@ -1907,6 +1916,11 @@
profile_prefs->ClearPref(kAccountIdMigrationState);
#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ // Added 05/2022.
+ profile_prefs->ClearPref(kColorModeThemed);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_PROFILE_PREFS