[keyboard-alt]: Update pref to track alt/search + click remap events
Updates:
- Alt and Search + click remap events are tracked separately
- Change pref type to integer as it provides the same info
needed to determine default values as well as gives us a
way to better understand usage.
- We may choose to set a threshold at which the remap behavior
will be disabled (i.e., less than 5 remapped events)
Bug: b/279503977
Change-Id: Ic6a5f0710a89bf082bec5ab6ece96461f463ffc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4518238
Reviewed-by: David Padlipsky <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Michael Checo <[email protected]>
Commit-Queue: Michael Checo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1148109}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 9aa9afc..ffc921a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -848,6 +848,12 @@
"accessibility.screen_ai.scheduled_deletion_time";
#endif
+// Deprecated 05/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+const char kEventRemappedToRightClick[] =
+ "ash.settings.event_remapped_to_right_click";
+#endif
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1185,6 +1191,11 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
registry->RegisterStringPref(kSamlPasswordSyncToken, std::string());
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// Deprecated 05/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ registry->RegisterBooleanPref(kEventRemappedToRightClick, false);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
}
} // namespace
@@ -2248,6 +2259,11 @@
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Added 05/2023.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+ profile_prefs->ClearPref(kEventRemappedToRightClick);
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// Added 05/2023.
#if BUILDFLAG(IS_ANDROID)
profile_prefs->ClearPref(kTimesUPMAuthErrorShown);
#endif // BUILDFLAG(IS_ANDROID)