Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: chrome/browser/prefs/browser_prefs.cc

Issue 2467023004: Make the toggle touchscreen/touchpad shortcuts apply per-user (Closed)
Patch Set: Doing the migration right Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/system/input_device_settings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/browser_prefs.cc
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 797e3e62b365f45819382df0a9027318f7b16ce6..6af2627a29609b8e93fd27625a5dadc7e1b2d581 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -254,12 +254,6 @@
namespace {
-#if defined(OS_WIN)
-// Deprecated 11/2015 (M48). TODO(gab): delete in M52+.
-const char kShownAutoLaunchInfobarDeprecated[] =
- "browser.shown_autolaunch_infobar";
-#endif // defined(OS_WIN)
-
// The SessionStartupPref used this pref to store the list of URLs to restore
// on startup, and then renamed it to "sessions.startup_urls" in M31. Migration
// code was added and the timestamp of when the migration happened was tracked
@@ -432,7 +426,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
chromeos::SigninScreenHandler::RegisterPrefs(registry);
chromeos::StartupUtils::RegisterPrefs(registry);
chromeos::system::AutomaticRebootManager::RegisterPrefs(registry);
- chromeos::system::InputDeviceSettings::RegisterPrefs(registry);
chromeos::TimeZoneResolver::RegisterPrefs(registry);
chromeos::UserImageManager::RegisterPrefs(registry);
chromeos::UserSessionManager::RegisterPrefs(registry);
@@ -447,6 +440,10 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
policy::DeviceStatusCollector::RegisterPrefs(registry);
policy::PolicyCertServiceFactory::RegisterPrefs(registry);
quirks::QuirksManager::RegisterPrefs(registry);
+
+ // Moved to profile prefs, but we still need to register the prefs in local
+ // state until migration is complete (See MigrateObsoleteBrowserPrefs()).
+ chromeos::system::InputDeviceSettings::RegisterProfilePrefs(registry);
#endif
#if defined(OS_MACOSX)
@@ -607,6 +604,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
chromeos::RegisterQuickUnlockProfilePrefs(registry);
chromeos::SAMLOfflineSigninLimiter::RegisterProfilePrefs(registry);
chromeos::ServicesCustomizationDocument::RegisterProfilePrefs(registry);
+ chromeos::system::InputDeviceSettings::RegisterProfilePrefs(registry);
chromeos::UserImageSyncObserver::RegisterProfilePrefs(registry);
extensions::EPKPChallengeUserKey::RegisterProfilePrefs(registry);
flags_ui::PrefServiceFlagsStorage::RegisterProfilePrefs(registry);
@@ -638,10 +636,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
// Preferences registered only for migration (clearing or moving to a new key)
// go here.
-#if defined(OS_WIN)
- registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0);
-#endif // defined(OS_WIN)
-
#if defined(USE_AURA)
registry->RegisterIntegerPref(kFlingMaxCancelToDownTimeInMs, 0);
registry->RegisterIntegerPref(kFlingMaxTapGapTimeInMs, 0);
@@ -706,17 +700,17 @@ void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
// This method should be periodically pruned of year+ old migrations.
void MigrateObsoleteBrowserPrefs(Profile* profile, PrefService* local_state) {
+#if defined(OS_CHROMEOS)
+ // Added 11/2016
+ local_state->ClearPref(prefs::kTouchScreenEnabled);
+ local_state->ClearPref(prefs::kTouchPadEnabled);
+#endif // defined(OS_CHROMEOS)
}
// This method should be periodically pruned of year+ old migrations.
void MigrateObsoleteProfilePrefs(Profile* profile) {
PrefService* profile_prefs = profile->GetPrefs();
-#if defined(OS_WIN)
- // Added 11/2015.
- profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated);
-#endif
-
#if defined(OS_MACOSX)
// Migrate the value of kHideFullscreenToolbar to kShowFullscreenToolbar if
// it was set by the user. See crbug.com/590827.
« no previous file with comments | « chrome/browser/chromeos/system/input_device_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698