diff options
125 files changed, 576 insertions, 1602 deletions
diff --git a/chrome/browser/accessibility/animation_policy_prefs.cc b/chrome/browser/accessibility/animation_policy_prefs.cc index 45b795a..6974c40 100644 --- a/chrome/browser/accessibility/animation_policy_prefs.cc +++ b/chrome/browser/accessibility/animation_policy_prefs.cc @@ -12,8 +12,6 @@ const char kAnimationPolicyOnce[] = "once"; const char kAnimationPolicyNone[] = "none"; void RegisterAnimationPolicyPrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kAnimationPolicy, - kAnimationPolicyAllowed, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kAnimationPolicy, + kAnimationPolicyAllowed); } diff --git a/chrome/browser/accessibility/invert_bubble_prefs.cc b/chrome/browser/accessibility/invert_bubble_prefs.cc index 3570c19..2bccd15 100644 --- a/chrome/browser/accessibility/invert_bubble_prefs.cc +++ b/chrome/browser/accessibility/invert_bubble_prefs.cc @@ -10,10 +10,7 @@ namespace chrome { void RegisterInvertBubbleUserPrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kInvertNotificationShown, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kInvertNotificationShown, false); } } // namespace chrome diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc b/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc index 433b0ca..c113377 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc +++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc @@ -69,9 +69,7 @@ PartnerBookmarksShim* PartnerBookmarksShim::BuildForBrowserContext( // static void PartnerBookmarksShim::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref( - prefs::kPartnerBookmarkMappings, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kPartnerBookmarkMappings); } // static diff --git a/chrome/browser/android/new_tab_page_prefs.cc b/chrome/browser/android/new_tab_page_prefs.cc index 616beb0..7d2eb22 100644 --- a/chrome/browser/android/new_tab_page_prefs.cc +++ b/chrome/browser/android/new_tab_page_prefs.cc @@ -108,28 +108,12 @@ void NewTabPagePrefs::SetForeignSessionCollapsed(JNIEnv* env, // static void NewTabPagePrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kNtpCollapsedCurrentlyOpenTabs, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kNtpCollapsedSnapshotDocument, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kNtpCollapsedRecentlyClosedTabs, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kNtpCollapsedSyncPromo, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kNtpCollapsedForeignSessions, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kNtpMostVisitedURLsBlacklist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kNtpCollapsedCurrentlyOpenTabs, false); + registry->RegisterBooleanPref(prefs::kNtpCollapsedSnapshotDocument, false); + registry->RegisterBooleanPref(prefs::kNtpCollapsedRecentlyClosedTabs, false); + registry->RegisterBooleanPref(prefs::kNtpCollapsedSyncPromo, false); + registry->RegisterDictionaryPref(prefs::kNtpCollapsedForeignSessions); + registry->RegisterDictionaryPref(prefs::kNtpMostVisitedURLsBlacklist); } // static diff --git a/chrome/browser/apps/drive/drive_app_mapping.cc b/chrome/browser/apps/drive/drive_app_mapping.cc index 8456fcd..78058f4 100644 --- a/chrome/browser/apps/drive/drive_app_mapping.cc +++ b/chrome/browser/apps/drive/drive_app_mapping.cc @@ -43,12 +43,8 @@ DriveAppMapping::~DriveAppMapping() { // static void DriveAppMapping::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kAppLauncherDriveAppMapping, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kAppLauncherUninstalledDriveApps, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kAppLauncherDriveAppMapping); + registry->RegisterListPref(prefs::kAppLauncherUninstalledDriveApps); } void DriveAppMapping::Add(const std::string& drive_app_id, diff --git a/chrome/browser/apps/shortcut_manager.cc b/chrome/browser/apps/shortcut_manager.cc index be1533a..819df61 100644 --- a/chrome/browser/apps/shortcut_manager.cc +++ b/chrome/browser/apps/shortcut_manager.cc @@ -75,9 +75,7 @@ void SetCurrentAppShortcutsVersion(PrefService* prefs) { void AppShortcutManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { // Indicates whether app shortcuts have been created. - registry->RegisterIntegerPref( - prefs::kAppShortcutsVersion, 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kAppShortcutsVersion, 0); } AppShortcutManager::AppShortcutManager(Profile* profile) diff --git a/chrome/browser/autocomplete/zero_suggest_provider.cc b/chrome/browser/autocomplete/zero_suggest_provider.cc index ed00030..bb9f460 100644 --- a/chrome/browser/autocomplete/zero_suggest_provider.cc +++ b/chrome/browser/autocomplete/zero_suggest_provider.cc @@ -85,10 +85,7 @@ ZeroSuggestProvider* ZeroSuggestProvider::Create( // static void ZeroSuggestProvider::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kZeroSuggestCachedResults, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kZeroSuggestCachedResults, std::string()); } void ZeroSuggestProvider::Start(const AutocompleteInput& input, diff --git a/chrome/browser/background/background_contents_service_factory.cc b/chrome/browser/background/background_contents_service_factory.cc index e15f860..de469a4 100644 --- a/chrome/browser/background/background_contents_service_factory.cc +++ b/chrome/browser/background/background_contents_service_factory.cc @@ -45,9 +45,7 @@ KeyedService* BackgroundContentsServiceFactory::BuildServiceInstanceFor( void BackgroundContentsServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* user_prefs) { - user_prefs->RegisterDictionaryPref( - prefs::kRegisteredBackgroundContents, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterDictionaryPref(prefs::kRegisteredBackgroundContents); } content::BrowserContext* diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc index e0f7e80..e031858 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chrome/browser/bookmarks/bookmark_model_factory.cc @@ -88,14 +88,9 @@ void BookmarkModelFactory::RegisterProfilePrefs( // want to sync the expanded state of folders, it should be part of // bookmark sync itself (i.e., a property of the sync folder nodes). registry->RegisterListPref(bookmarks::prefs::kBookmarkEditorExpandedNodes, - new base::ListValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - bookmarks::prefs::kManagedBookmarks, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - bookmarks::prefs::kSupervisedBookmarks, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + new base::ListValue); + registry->RegisterListPref(bookmarks::prefs::kManagedBookmarks); + registry->RegisterListPref(bookmarks::prefs::kSupervisedBookmarks); } content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 2617765..f1cb6e4 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -641,17 +641,9 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { // static void ChromeContentBrowserClient::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kDisable3DAPIs, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kEnableHyperlinkAuditing, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kEnableDeprecatedWebPlatformFeatures, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false); + registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true); + registry->RegisterListPref(prefs::kEnableDeprecatedWebPlatformFeatures); } // static diff --git a/chrome/browser/chromeos/customization/customization_document.cc b/chrome/browser/chromeos/customization/customization_document.cc index 9aae363..368908b 100644 --- a/chrome/browser/chromeos/customization/customization_document.cc +++ b/chrome/browser/chromeos/customization/customization_document.cc @@ -440,9 +440,7 @@ void ServicesCustomizationDocument::RegisterPrefs( // static void ServicesCustomizationDocument::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - kServicesCustomizationKey, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kServicesCustomizationKey); } // static diff --git a/chrome/browser/chromeos/file_system_provider/registry.cc b/chrome/browser/chromeos/file_system_provider/registry.cc index f3b3cd7..d6d6404 100644 --- a/chrome/browser/chromeos/file_system_provider/registry.cc +++ b/chrome/browser/chromeos/file_system_provider/registry.cc @@ -36,9 +36,7 @@ const char kPrefKeyWatcherPersistentOrigins[] = "persistent-origins"; const char kPrefKeyOpenedFilesLimit[] = "opened-files-limit"; void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kFileSystemProviderMounted, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kFileSystemProviderMounted); } std::string SourceToString(Source source) { diff --git a/chrome/browser/chromeos/input_method/input_method_syncer.cc b/chrome/browser/chromeos/input_method/input_method_syncer.cc index 1c82be7..b76080c 100644 --- a/chrome/browser/chromeos/input_method/input_method_syncer.cc +++ b/chrome/browser/chromeos/input_method/input_method_syncer.cc @@ -140,10 +140,7 @@ void InputMethodSyncer::RegisterProfilePrefs( prefs::kLanguageEnabledExtensionImesSyncable, "", user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kLanguageShouldMergeInputMethods, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kLanguageShouldMergeInputMethods, false); } void InputMethodSyncer::Initialize() { diff --git a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc index b5639d3..ba92b40 100644 --- a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc +++ b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc @@ -31,14 +31,9 @@ const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. // static void SAMLOfflineSigninLimiter::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kSAMLOfflineSigninTimeLimit, - kDefaultSAMLOfflineSigninTimeLimit, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kSAMLLastGAIASignInTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kSAMLOfflineSigninTimeLimit, + kDefaultSAMLOfflineSigninTimeLimit); + registry->RegisterInt64Pref(prefs::kSAMLLastGAIASignInTime, 0); } void SAMLOfflineSigninLimiter::SignedIn(UserContext::AuthFlow auth_flow) { diff --git a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc index 6a3a1c8b..e173300 100644 --- a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc +++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc @@ -73,10 +73,8 @@ void MultiProfileUserController::RegisterPrefs( // static void MultiProfileUserController::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kMultiProfileUserBehavior, - kBehaviorUnrestricted, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kMultiProfileUserBehavior, + kBehaviorUnrestricted); registry->RegisterBooleanPref( prefs::kMultiProfileNeverShowIntro, false, diff --git a/chrome/browser/chromeos/net/proxy_config_handler.cc b/chrome/browser/chromeos/net/proxy_config_handler.cc index 782b035..4fa3d66 100644 --- a/chrome/browser/chromeos/net/proxy_config_handler.cc +++ b/chrome/browser/chromeos/net/proxy_config_handler.cc @@ -130,13 +130,9 @@ void RegisterPrefs(PrefRegistrySimple* registry) { } void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kUseSharedProxies, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kUseSharedProxies, false); - registry->RegisterListPref(prefs::kOpenNetworkConfiguration, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kOpenNetworkConfiguration); } } // namespace proxy_config diff --git a/chrome/browser/chromeos/policy/policy_cert_service_factory.cc b/chrome/browser/chromeos/policy/policy_cert_service_factory.cc index 4955bc0..52a69f3 100644 --- a/chrome/browser/chromeos/policy/policy_cert_service_factory.cc +++ b/chrome/browser/chromeos/policy/policy_cert_service_factory.cc @@ -140,10 +140,7 @@ void PolicyCertServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { // TODO(joaodasilva): this is used for backwards compatibility. // Remove once it's not necessary anymore. - registry->RegisterBooleanPref( - prefs::kUsedPolicyCertificatesOnce, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kUsedPolicyCertificatesOnce, false); } bool PolicyCertServiceFactory::ServiceIsNULLWhileTesting() const { diff --git a/chrome/browser/chromeos/power/power_prefs.cc b/chrome/browser/chromeos/power/power_prefs.cc index 9b7b864..5dc80f9 100644 --- a/chrome/browser/chromeos/power/power_prefs.cc +++ b/chrome/browser/chromeos/power/power_prefs.cc @@ -50,14 +50,10 @@ void PowerPrefs::RegisterUserProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { RegisterProfilePrefs(registry); - registry->RegisterIntegerPref( - prefs::kPowerBatteryIdleAction, - PowerPolicyController::ACTION_SUSPEND, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerLidClosedAction, - PowerPolicyController::ACTION_SUSPEND, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kPowerBatteryIdleAction, + PowerPolicyController::ACTION_SUSPEND); + registry->RegisterIntegerPref(prefs::kPowerLidClosedAction, + PowerPolicyController::ACTION_SUSPEND); } // static @@ -65,14 +61,10 @@ void PowerPrefs::RegisterLoginProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { RegisterProfilePrefs(registry); - registry->RegisterIntegerPref( - prefs::kPowerBatteryIdleAction, - PowerPolicyController::ACTION_SHUT_DOWN, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerLidClosedAction, - PowerPolicyController::ACTION_SHUT_DOWN, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kPowerBatteryIdleAction, + PowerPolicyController::ACTION_SHUT_DOWN); + registry->RegisterIntegerPref(prefs::kPowerLidClosedAction, + PowerPolicyController::ACTION_SHUT_DOWN); } void PowerPrefs::Observe(int type, @@ -170,90 +162,34 @@ void PowerPrefs::UpdatePowerPolicyFromPrefs() { // static void PowerPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kPowerAcScreenDimDelayMs, - 420000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerAcScreenOffDelayMs, - 480000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerAcScreenLockDelayMs, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerAcIdleWarningDelayMs, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerAcIdleDelayMs, - 1800000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerBatteryScreenDimDelayMs, - 300000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerBatteryScreenOffDelayMs, - 360000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerBatteryScreenLockDelayMs, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerBatteryIdleWarningDelayMs, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerBatteryIdleDelayMs, - 600000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerLockScreenDimDelayMs, - 30000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerLockScreenOffDelayMs, - 40000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kPowerAcIdleAction, - PowerPolicyController::ACTION_SUSPEND, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPowerUseAudioActivity, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPowerUseVideoActivity, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPowerAllowScreenWakeLocks, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kPowerAcScreenDimDelayMs, 420000); + registry->RegisterIntegerPref(prefs::kPowerAcScreenOffDelayMs, 480000); + registry->RegisterIntegerPref(prefs::kPowerAcScreenLockDelayMs, 0); + registry->RegisterIntegerPref(prefs::kPowerAcIdleWarningDelayMs, 0); + registry->RegisterIntegerPref(prefs::kPowerAcIdleDelayMs, 1800000); + registry->RegisterIntegerPref(prefs::kPowerBatteryScreenDimDelayMs, 300000); + registry->RegisterIntegerPref(prefs::kPowerBatteryScreenOffDelayMs, 360000); + registry->RegisterIntegerPref(prefs::kPowerBatteryScreenLockDelayMs, 0); + registry->RegisterIntegerPref(prefs::kPowerBatteryIdleWarningDelayMs, 0); + registry->RegisterIntegerPref(prefs::kPowerBatteryIdleDelayMs, 600000); + registry->RegisterIntegerPref(prefs::kPowerLockScreenDimDelayMs, 30000); + registry->RegisterIntegerPref(prefs::kPowerLockScreenOffDelayMs, 40000); + registry->RegisterIntegerPref(prefs::kPowerAcIdleAction, + PowerPolicyController::ACTION_SUSPEND); + registry->RegisterBooleanPref(prefs::kPowerUseAudioActivity, true); + registry->RegisterBooleanPref(prefs::kPowerUseVideoActivity, true); + registry->RegisterBooleanPref(prefs::kPowerAllowScreenWakeLocks, true); registry->RegisterBooleanPref( prefs::kEnableAutoScreenLock, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterDoublePref( - prefs::kPowerPresentationScreenDimDelayFactor, - 2.0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDoublePref( - prefs::kPowerUserActivityScreenDimDelayFactor, - 2.0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPowerWaitForInitialUserActivity, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDoublePref(prefs::kPowerPresentationScreenDimDelayFactor, + 2.0); + registry->RegisterDoublePref(prefs::kPowerUserActivityScreenDimDelayFactor, + 2.0); + registry->RegisterBooleanPref(prefs::kPowerWaitForInitialUserActivity, false); registry->RegisterBooleanPref( - prefs::kPowerForceNonzeroBrightnessForUserActivity, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kPowerForceNonzeroBrightnessForUserActivity, true); } void PowerPrefs::SetProfile(Profile* profile) { diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index ba4f242..26bdbd9 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -107,10 +107,7 @@ void Preferences::RegisterProfilePrefs( hardware_keyboard_id = "xkb:us::eng"; // only for testing. } - registry->RegisterBooleanPref( - prefs::kPerformanceTracingEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPerformanceTracingEnabled, false); registry->RegisterBooleanPref( prefs::kTapToClickEnabled, @@ -120,10 +117,7 @@ void Preferences::RegisterProfilePrefs( prefs::kTapDraggingEnabled, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); - registry->RegisterBooleanPref( - prefs::kEnableTouchpadThreeFingerClick, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kEnableTouchpadThreeFingerClick, false); registry->RegisterBooleanPref( prefs::kNaturalScroll, base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kNaturalScrollDefault), @@ -132,14 +126,8 @@ void Preferences::RegisterProfilePrefs( prefs::kPrimaryMouseButtonRight, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); - registry->RegisterBooleanPref( - prefs::kLabsMediaplayerEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kLabsAdvancedFilesystemEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kLabsMediaplayerEnabled, false); + registry->RegisterBooleanPref(prefs::kLabsAdvancedFilesystemEnabled, false); registry->RegisterBooleanPref( prefs::kAccessibilityStickyKeysEnabled, false, @@ -148,10 +136,8 @@ void Preferences::RegisterProfilePrefs( prefs::kAccessibilityLargeCursorEnabled, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kAccessibilitySpokenFeedbackEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAccessibilitySpokenFeedbackEnabled, + false); registry->RegisterBooleanPref( prefs::kAccessibilityHighContrastEnabled, false, @@ -164,10 +150,8 @@ void Preferences::RegisterProfilePrefs( prefs::kAccessibilityScreenMagnifierType, ui::kDefaultMagnifierType, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterDoublePref( - prefs::kAccessibilityScreenMagnifierScale, - std::numeric_limits<double>::min(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDoublePref(prefs::kAccessibilityScreenMagnifierScale, + std::numeric_limits<double>::min()); registry->RegisterBooleanPref( prefs::kAccessibilityAutoclickEnabled, false, @@ -210,26 +194,13 @@ void Preferences::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // We don't sync prefs::kLanguageCurrentInputMethod and PreviousInputMethod // because they're just used to track the logout state of the device. - registry->RegisterStringPref( - prefs::kLanguageCurrentInputMethod, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kLanguagePreviousInputMethod, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kLanguagePreferredLanguages, - kFallbackInputMethodLocale, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kLanguagePreloadEngines, - hardware_keyboard_id, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kLanguageEnabledExtensionImes, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kLanguageCurrentInputMethod, ""); + registry->RegisterStringPref(prefs::kLanguagePreviousInputMethod, ""); + registry->RegisterStringPref(prefs::kLanguagePreferredLanguages, + kFallbackInputMethodLocale); + registry->RegisterStringPref(prefs::kLanguagePreloadEngines, + hardware_keyboard_id); + registry->RegisterStringPref(prefs::kLanguageEnabledExtensionImes, ""); registry->RegisterIntegerPref( prefs::kLanguageRemapSearchKeyTo, @@ -246,10 +217,8 @@ void Preferences::RegisterProfilePrefs( // We don't sync the CapsLock remapping pref, since the UI hides this pref // on certain devices, so syncing a non-default value to a device that // doesn't allow changing the pref would be odd. http://crbug.com/167237 - registry->RegisterIntegerPref( - prefs::kLanguageRemapCapsLockKeyTo, - input_method::kCapsLockKey, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo, + input_method::kCapsLockKey); registry->RegisterIntegerPref( prefs::kLanguageRemapDiamondKeyTo, input_method::kControlKey, @@ -257,10 +226,7 @@ void Preferences::RegisterProfilePrefs( // The following pref isn't synced since the user may desire a different value // depending on whether an external keyboard is attached to a particular // device. - registry->RegisterBooleanPref( - prefs::kLanguageSendFunctionKeys, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kLanguageSendFunctionKeys, false); registry->RegisterBooleanPref( prefs::kLanguageXkbAutoRepeatEnabled, true, @@ -275,10 +241,7 @@ void Preferences::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // We don't sync wake-on-wifi related prefs because they are device specific. - registry->RegisterBooleanPref( - prefs::kWakeOnWifiSsid, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kWakeOnWifiSsid, true); // Mobile plan notifications default to on. registry->RegisterBooleanPref( @@ -287,16 +250,10 @@ void Preferences::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // 3G first-time usage promo will be shown at least once. - registry->RegisterBooleanPref( - prefs::kShow3gPromoNotification, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kShow3gPromoNotification, true); // Number of times Data Saver prompt has been shown on 3G data network. - registry->RegisterIntegerPref( - prefs::kDataSaverPromptsShown, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kDataSaverPromptsShown, 0); // Initially all existing users would see "What's new" for current version // after update. @@ -304,25 +261,13 @@ void Preferences::RegisterProfilePrefs( "0.0.0.0", user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kExternalStorageDisabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kExternalStorageDisabled, false); - registry->RegisterStringPref( - prefs::kTermsOfServiceURL, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kTermsOfServiceURL, ""); - registry->RegisterBooleanPref( - prefs::kTouchHudProjectionEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kTouchHudProjectionEnabled, false); - registry->RegisterBooleanPref( - prefs::kTouchVirtualKeyboardEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kTouchVirtualKeyboardEnabled, false); input_method::InputMethodSyncer::RegisterProfilePrefs(registry); @@ -330,13 +275,10 @@ void Preferences::RegisterProfilePrefs( prefs::kResolveTimezoneByGeolocation, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kCaptivePortalAuthenticationIgnoresProxy, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kCaptivePortalAuthenticationIgnoresProxy, + true); - registry->RegisterBooleanPref( - prefs::kForceMaximizeOnFirstRun, false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kForceMaximizeOnFirstRun, false); } void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc index 603a2d2..3ba5527 100644 --- a/chrome/browser/component_updater/sw_reporter_installer_win.cc +++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc @@ -474,17 +474,11 @@ void RegisterPrefsForSwReporter(PrefRegistrySimple* registry) { void RegisterProfilePrefsForSwReporter( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kSwReporterPromptReason, -1, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kSwReporterPromptReason, -1); - registry->RegisterStringPref( - prefs::kSwReporterPromptVersion, "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); - registry->RegisterStringPref( - prefs::kSwReporterPromptSeed, "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); } } // namespace component_updater diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc index 88a20e3..43b1b20 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc @@ -727,18 +727,11 @@ void ProtocolHandlerRegistry::Shutdown() { // static void ProtocolHandlerRegistry::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kRegisteredProtocolHandlers, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kIgnoredProtocolHandlers, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPolicyRegisteredProtocolHandlers, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPolicyIgnoredProtocolHandlers, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kCustomHandlersEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kRegisteredProtocolHandlers); + registry->RegisterListPref(prefs::kIgnoredProtocolHandlers); + registry->RegisterListPref(prefs::kPolicyRegisteredProtocolHandlers); + registry->RegisterListPref(prefs::kPolicyIgnoredProtocolHandlers); + registry->RegisterBooleanPref(prefs::kCustomHandlersEnabled, true); } ProtocolHandlerRegistry::~ProtocolHandlerRegistry() { diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc index 5706f4a..d069412 100644 --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc @@ -304,34 +304,17 @@ DevToolsWindow::~DevToolsWindow() { // static void DevToolsWindow::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kDevToolsEditedFiles, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kDevToolsFileSystemPaths, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDevToolsAdbKey, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - - registry->RegisterBooleanPref( - prefs::kDevToolsDiscoverUsbDevicesEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDevToolsPortForwardingEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDevToolsPortForwardingDefaultSet, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kDevToolsPortForwardingConfig, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kDevToolsPreferences, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kDevToolsEditedFiles); + registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths); + registry->RegisterStringPref(prefs::kDevToolsAdbKey, std::string()); + + registry->RegisterBooleanPref(prefs::kDevToolsDiscoverUsbDevicesEnabled, + true); + registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingEnabled, false); + registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingDefaultSet, + false); + registry->RegisterDictionaryPref(prefs::kDevToolsPortForwardingConfig); + registry->RegisterDictionaryPref(prefs::kDevToolsPreferences); } // static diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc index 9597aac..19fc13e 100644 --- a/chrome/browser/download/download_prefs.cc +++ b/chrome/browser/download/download_prefs.cc @@ -183,34 +183,19 @@ void DownloadPrefs::RegisterProfilePrefs( prefs::kPromptForDownload, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDownloadExtensionsToOpen, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDownloadDirUpgraded, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kSaveFileType, - content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, std::string()); + registry->RegisterBooleanPref(prefs::kDownloadDirUpgraded, false); + registry->RegisterIntegerPref(prefs::kSaveFileType, + content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML); const base::FilePath& default_download_path = GetDefaultDownloadDirectory(); - registry->RegisterFilePathPref( - prefs::kDownloadDefaultDirectory, - default_download_path, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterFilePathPref( - prefs::kSaveFileDefaultDirectory, - default_download_path, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterFilePathPref(prefs::kDownloadDefaultDirectory, + default_download_path); + registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, + default_download_path); #if defined(OS_WIN) || defined(OS_LINUX) || \ (defined(OS_MACOSX) && !defined(OS_IOS)) - registry->RegisterBooleanPref( - prefs::kOpenPdfDownloadInSystemReader, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif } diff --git a/chrome/browser/extensions/activity_log/activity_log.cc b/chrome/browser/extensions/activity_log/activity_log.cc index 1fad43a..059fd3e 100644 --- a/chrome/browser/extensions/activity_log/activity_log.cc +++ b/chrome/browser/extensions/activity_log/activity_log.cc @@ -512,10 +512,7 @@ void ActivityLog::RemoveObserver(ActivityLog::Observer* observer) { // static void ActivityLog::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kWatchdogExtensionActive, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kWatchdogExtensionActive, false); } // LOG ACTIONS. ---------------------------------------------------------------- diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc index 7c653e7..8db319d 100644 --- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc +++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc @@ -408,12 +408,8 @@ EPKPChallengeUserKey::~EPKPChallengeUserKey() { void EPKPChallengeUserKey::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kAttestationEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kAttestationExtensionWhitelist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAttestationEnabled, false); + registry->RegisterListPref(prefs::kAttestationExtensionWhitelist); } bool EPKPChallengeUserKey::RunAsync() { diff --git a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc index 86d6a5d..1ffe795 100644 --- a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc +++ b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc @@ -109,14 +109,10 @@ ExtensionControlledPrefsTest::~ExtensionControlledPrefsTest() { void ExtensionControlledPrefsTest::RegisterPreferences( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - kPref1, kDefaultPref1, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - kPref2, kDefaultPref2, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - kPref3, kDefaultPref3, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - kPref4, kDefaultPref4, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(kPref1, kDefaultPref1); + registry->RegisterStringPref(kPref2, kDefaultPref2); + registry->RegisterStringPref(kPref3, kDefaultPref3); + registry->RegisterStringPref(kPref4, kDefaultPref4); } void ExtensionControlledPrefsTest::InstallExtensionControlledPref( diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index 322cf16..dce6c5b 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -1633,10 +1633,7 @@ void TabsCaptureVisibleTabFunction::OnCaptureFailure(FailureReason reason) { void TabsCaptureVisibleTabFunction::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kDisableScreenshots, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDisableScreenshots, false); } bool TabsDetectLanguageFunction::RunAsync() { diff --git a/chrome/browser/extensions/default_apps.cc b/chrome/browser/extensions/default_apps.cc index 7b9c560..3b42e97 100644 --- a/chrome/browser/extensions/default_apps.cc +++ b/chrome/browser/extensions/default_apps.cc @@ -49,10 +49,7 @@ bool IsLocaleSupported() { namespace default_apps { void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kDefaultAppsInstallState, - kUnknown, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kDefaultAppsInstallState, kUnknown); } bool Provider::ShouldInstallInProfile() { diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc index 4d3adbc..bd995e5 100644 --- a/chrome/browser/extensions/extension_management.cc +++ b/chrome/browser/extensions/extension_management.cc @@ -493,9 +493,7 @@ content::BrowserContext* ExtensionManagementFactory::GetBrowserContextToUse( void ExtensionManagementFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* user_prefs) { - user_prefs->RegisterDictionaryPref( - pref_names::kExtensionManagement, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement); } } // namespace extensions diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc index 54ccc8b..ebb22a7 100644 --- a/chrome/browser/extensions/extension_web_ui.cc +++ b/chrome/browser/extensions/extension_web_ui.cc @@ -187,9 +187,7 @@ ExtensionWebUI::bookmark_manager_private_drag_event_router() { // static void ExtensionWebUI::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - kExtensionURLOverrides, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kExtensionURLOverrides); } // static diff --git a/chrome/browser/extensions/launch_util.cc b/chrome/browser/extensions/launch_util.cc index 3def897..1f8dcc7 100644 --- a/chrome/browser/extensions/launch_util.cc +++ b/chrome/browser/extensions/launch_util.cc @@ -34,10 +34,8 @@ namespace launch_util { // static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - pref_names::kBookmarkAppCreationLaunchType, - LAUNCH_TYPE_REGULAR, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(pref_names::kBookmarkAppCreationLaunchType, + LAUNCH_TYPE_REGULAR); } } // namespace launch_util diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index 0e88b9f..26ef116 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -620,10 +620,7 @@ std::string GetPingDelayPrefName() { } void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - GetPingDelayPrefName().c_str(), - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(GetPingDelayPrefName().c_str(), 0); } bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { diff --git a/chrome/browser/font_family_cache_unittest.cc b/chrome/browser/font_family_cache_unittest.cc index b7f8925..1911b0b 100644 --- a/chrome/browser/font_family_cache_unittest.cc +++ b/chrome/browser/font_family_cache_unittest.cc @@ -43,14 +43,8 @@ TEST(FontFamilyCacheTest, Caching) { std::string pref_name2(map_name + '.' + "adsf"); // Registers 2 preferences, and sets the first one. - prefs->registry()->RegisterStringPref( - pref_name.c_str(), - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->registry()->RegisterStringPref( - pref_name2.c_str(), - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->registry()->RegisterStringPref(pref_name.c_str(), std::string()); + prefs->registry()->RegisterStringPref(pref_name2.c_str(), std::string()); prefs->SetString(pref_name.c_str(), font1.c_str()); // Check that the right preference is returned. diff --git a/chrome/browser/geolocation/geolocation_permission_context_factory.cc b/chrome/browser/geolocation/geolocation_permission_context_factory.cc index c1259b1..59168c5 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_factory.cc +++ b/chrome/browser/geolocation/geolocation_permission_context_factory.cc @@ -61,10 +61,7 @@ GeolocationPermissionContextFactory::BuildServiceInstanceFor( void GeolocationPermissionContextFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { #if defined(OS_ANDROID) - registry->RegisterBooleanPref( - prefs::kGeolocationEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kGeolocationEnabled, true); #endif } diff --git a/chrome/browser/google/google_url_tracker_factory.cc b/chrome/browser/google/google_url_tracker_factory.cc index 1ba3e69..81538e8 100644 --- a/chrome/browser/google/google_url_tracker_factory.cc +++ b/chrome/browser/google/google_url_tracker_factory.cc @@ -54,14 +54,9 @@ KeyedService* GoogleURLTrackerFactory::BuildServiceInstanceFor( void GoogleURLTrackerFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* user_prefs) { - user_prefs->RegisterStringPref( - prefs::kLastKnownGoogleURL, - GoogleURLTracker::kDefaultGoogleHomepage, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - user_prefs->RegisterStringPref( - kLastPromptedGoogleURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterStringPref(prefs::kLastKnownGoogleURL, + GoogleURLTracker::kDefaultGoogleHomepage); + user_prefs->RegisterStringPref(kLastPromptedGoogleURL, std::string()); } content::BrowserContext* GoogleURLTrackerFactory::GetBrowserContextToUse( diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc index ec8043d..851b456 100644 --- a/chrome/browser/media/media_capture_devices_dispatcher.cc +++ b/chrome/browser/media/media_capture_devices_dispatcher.cc @@ -290,14 +290,10 @@ MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} void MediaCaptureDevicesDispatcher::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kDefaultAudioCaptureDevice, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultVideoCaptureDevice, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kDefaultAudioCaptureDevice, + std::string()); + registry->RegisterStringPref(prefs::kDefaultVideoCaptureDevice, + std::string()); } void MediaCaptureDevicesDispatcher::AddObserver(Observer* observer) { diff --git a/chrome/browser/media/media_device_id_salt.cc b/chrome/browser/media/media_device_id_salt.cc index 3226c70..8f2f970 100644 --- a/chrome/browser/media/media_device_id_salt.cc +++ b/chrome/browser/media/media_device_id_salt.cc @@ -58,10 +58,7 @@ std::string MediaDeviceIDSalt::GetSalt() const { void MediaDeviceIDSalt::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kMediaDeviceIdSalt, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kMediaDeviceIdSalt, std::string()); } void MediaDeviceIDSalt::Reset(PrefService* pref_service) { diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc index e8863df..0f08b8c 100644 --- a/chrome/browser/media/media_stream_devices_controller.cc +++ b/chrome/browser/media/media_stream_devices_controller.cc @@ -215,16 +215,10 @@ MediaStreamDevicesController::~MediaStreamDevicesController() { // static void MediaStreamDevicesController::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* prefs) { - prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, true); + prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, true); + prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls); + prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls); } // TODO(gbillock): rename? doesn't actually dismiss. More of a 'check profile diff --git a/chrome/browser/media/protected_media_identifier_permission_context_factory.cc b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc index b699282..e6ace58 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context_factory.cc +++ b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc @@ -48,10 +48,7 @@ void ProtectedMediaIdentifierPermissionContextFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { #if defined(OS_ANDROID) - registry->RegisterBooleanPref( - prefs::kProtectedMediaIdentifierEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kProtectedMediaIdentifierEnabled, true); #endif } diff --git a/chrome/browser/media_galleries/media_galleries_preferences.cc b/chrome/browser/media_galleries/media_galleries_preferences.cc index 57aae66..553f736 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences.cc @@ -1315,16 +1315,11 @@ bool MediaGalleriesPreferences::APIHasBeenUsed(Profile* profile) { // static void MediaGalleriesPreferences::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterUint64Pref( - prefs::kMediaGalleriesUniqueId, - kInvalidMediaGalleryPrefId + 1, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kMediaGalleriesLastScanTime, - base::Time().ToInternalValue(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries); + registry->RegisterUint64Pref(prefs::kMediaGalleriesUniqueId, + kInvalidMediaGalleryPrefId + 1); + registry->RegisterInt64Pref(prefs::kMediaGalleriesLastScanTime, + base::Time().ToInternalValue()); } bool MediaGalleriesPreferences::SetGalleryPermissionInPrefs( diff --git a/chrome/browser/metrics/variations/variations_service.cc b/chrome/browser/metrics/variations/variations_service.cc index 3a8c009..9d7618e 100644 --- a/chrome/browser/metrics/variations/variations_service.cc +++ b/chrome/browser/metrics/variations/variations_service.cc @@ -419,10 +419,8 @@ void VariationsService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { // This preference will only be written by the policy service, which will fill // it according to a value stored in the User Policy. - registry->RegisterStringPref( - prefs::kVariationsRestrictParameter, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kVariationsRestrictParameter, + std::string()); } // static diff --git a/chrome/browser/net/http_server_properties_manager_factory.cc b/chrome/browser/net/http_server_properties_manager_factory.cc index 72acd43..ecd09e1 100644 --- a/chrome/browser/net/http_server_properties_manager_factory.cc +++ b/chrome/browser/net/http_server_properties_manager_factory.cc @@ -24,9 +24,7 @@ HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service) { /* static */ void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kHttpServerProperties, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kHttpServerProperties); } } // namespace chrome_browser_net diff --git a/chrome/browser/net/net_pref_observer.cc b/chrome/browser/net/net_pref_observer.cc index 8046e4d..8027bdb 100644 --- a/chrome/browser/net/net_pref_observer.cc +++ b/chrome/browser/net/net_pref_observer.cc @@ -43,8 +43,5 @@ void NetPrefObserver::RegisterProfilePrefs( prefs::kNetworkPredictionEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDisableSpdy, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDisableSpdy, false); } diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc index b135b2f..539bf89 100644 --- a/chrome/browser/net/predictor.cc +++ b/chrome/browser/net/predictor.cc @@ -176,10 +176,8 @@ Predictor* Predictor::CreatePredictor(bool preconnect_enabled, void Predictor::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kDnsPrefetchingStartupList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kDnsPrefetchingStartupList); + registry->RegisterListPref(prefs::kDnsPrefetchingHostReferralList); } // --------------------- Start UI methods. ------------------------------------ diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.cc b/chrome/browser/net/pref_proxy_config_tracker_impl.cc index 3e969c8..61ae371 100644 --- a/chrome/browser/net/pref_proxy_config_tracker_impl.cc +++ b/chrome/browser/net/pref_proxy_config_tracker_impl.cc @@ -212,10 +212,7 @@ void PrefProxyConfigTrackerImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* pref_service) { base::DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem(); - pref_service->RegisterDictionaryPref( - prefs::kProxy, - default_settings, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + pref_service->RegisterDictionaryPref(prefs::kProxy, default_settings); } // static diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc index 7c91e9d..87ef679 100644 --- a/chrome/browser/notifications/desktop_notification_service.cc +++ b/chrome/browser/notifications/desktop_notification_service.cc @@ -45,12 +45,8 @@ using message_center::NotifierId; // static void DesktopNotificationService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref( - prefs::kMessageCenterDisabledExtensionIds, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kMessageCenterDisabledSystemComponentIds, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kMessageCenterDisabledExtensionIds); + registry->RegisterListPref(prefs::kMessageCenterDisabledSystemComponentIds); } DesktopNotificationService::DesktopNotificationService(Profile* profile) diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc index 335ebb8..5cb62ca 100644 --- a/chrome/browser/notifications/extension_welcome_notification.cc +++ b/chrome/browser/notifications/extension_welcome_notification.cc @@ -218,15 +218,10 @@ void ExtensionWelcomeNotification::RegisterProfilePrefs( prefs->RegisterBooleanPref(prefs::kWelcomeNotificationDismissed, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - prefs->RegisterBooleanPref(prefs::kWelcomeNotificationDismissedLocal, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->RegisterBooleanPref(prefs::kWelcomeNotificationDismissedLocal, false); prefs->RegisterBooleanPref(prefs::kWelcomeNotificationPreviouslyPoppedUp, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterInt64Pref(prefs::kWelcomeNotificationExpirationTimestamp, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + false); + prefs->RegisterInt64Pref(prefs::kWelcomeNotificationExpirationTimestamp, 0); } message_center::MessageCenter* diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc index 7acd80d..7d4e64e 100644 --- a/chrome/browser/password_manager/password_store_factory.cc +++ b/chrome/browser/password_manager/password_store_factory.cc @@ -356,10 +356,8 @@ void PasswordStoreFactory::RegisterProfilePrefs( #if !defined(OS_CHROMEOS) && defined(USE_X11) // Notice that the preprocessor conditions above are exactly those that will // result in using PasswordStoreX in BuildServiceInstanceFor(). - registry->RegisterIntegerPref( - password_manager::prefs::kLocalProfileId, - kInvalidLocalProfileId, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(password_manager::prefs::kLocalProfileId, + kInvalidLocalProfileId); #endif } diff --git a/chrome/browser/pepper_flash_settings_manager.cc b/chrome/browser/pepper_flash_settings_manager.cc index 7dad619..eb64b49 100644 --- a/chrome/browser/pepper_flash_settings_manager.cc +++ b/chrome/browser/pepper_flash_settings_manager.cc @@ -970,15 +970,9 @@ bool PepperFlashSettingsManager::IsPepperFlashInUse( // static void PepperFlashSettingsManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kDeauthorizeContentLicenses, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - - registry->RegisterBooleanPref( - prefs::kPepperFlashSettingsEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDeauthorizeContentLicenses, false); + + registry->RegisterBooleanPref(prefs::kPepperFlashSettingsEnabled, true); } uint32 PepperFlashSettingsManager::DeauthorizeContentLicenses( diff --git a/chrome/browser/plugins/plugin_prefs_factory.cc b/chrome/browser/plugins/plugin_prefs_factory.cc index 862fa91..6e176b5 100644 --- a/chrome/browser/plugins/plugin_prefs_factory.cc +++ b/chrome/browser/plugins/plugin_prefs_factory.cc @@ -55,30 +55,16 @@ void PluginPrefsFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { base::FilePath internal_dir; PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); - registry->RegisterFilePathPref( - prefs::kPluginsLastInternalDirectory, - internal_dir, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, + internal_dir); + registry->RegisterBooleanPref(prefs::kPluginsMigratedToPepperFlash, false); registry->RegisterBooleanPref( - prefs::kPluginsMigratedToPepperFlash, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPluginsRemovedOldComponentPepperFlashSettings, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPluginsPluginsList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPluginsDisabledPlugins, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPluginsEnabledPlugins, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kEnableNpapi, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kPluginsRemovedOldComponentPepperFlashSettings, false); + registry->RegisterListPref(prefs::kPluginsPluginsList); + registry->RegisterListPref(prefs::kPluginsDisabledPlugins); + registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions); + registry->RegisterListPref(prefs::kPluginsEnabledPlugins); + registry->RegisterBooleanPref(prefs::kEnableNpapi, false); } content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse( diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc index dd9ea86..60c2b5c 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc @@ -98,10 +98,7 @@ UserPolicySigninServiceFactory::ServiceIsCreatedWithBrowserContext() const { void UserPolicySigninServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* user_prefs) { #if defined(OS_ANDROID) || defined(OS_IOS) - user_prefs->RegisterInt64Pref( - prefs::kLastPolicyCheckTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterInt64Pref(prefs::kLastPolicyCheckTime, 0); #endif } diff --git a/chrome/browser/prefs/incognito_mode_prefs.cc b/chrome/browser/prefs/incognito_mode_prefs.cc index 06bb0e0..0584bfc 100644 --- a/chrome/browser/prefs/incognito_mode_prefs.cc +++ b/chrome/browser/prefs/incognito_mode_prefs.cc @@ -98,10 +98,8 @@ void IncognitoModePrefs::SetAvailability(PrefService* prefs, // static void IncognitoModePrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kIncognitoModeAvailability, - IncognitoModePrefs::ENABLED, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kIncognitoModeAvailability, + IncognitoModePrefs::ENABLED); } // static diff --git a/chrome/browser/prefs/prefs_syncable_service_unittest.cc b/chrome/browser/prefs/prefs_syncable_service_unittest.cc index e5e8427..a55a3d1 100644 --- a/chrome/browser/prefs/prefs_syncable_service_unittest.cc +++ b/chrome/browser/prefs/prefs_syncable_service_unittest.cc @@ -75,10 +75,8 @@ class PrefsSyncableServiceTest : public testing::Test { next_pref_remote_sync_node_id_(0) {} void SetUp() override { - prefs_.registry()->RegisterStringPref( - kUnsyncedPreferenceName, - kUnsyncedPreferenceDefaultValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs_.registry()->RegisterStringPref(kUnsyncedPreferenceName, + kUnsyncedPreferenceDefaultValue); prefs_.registry()->RegisterStringPref( prefs::kHomePage, std::string(), @@ -86,9 +84,7 @@ class PrefsSyncableServiceTest : public testing::Test { prefs_.registry()->RegisterListPref( prefs::kURLsToRestoreOnStartup, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - prefs_.registry()->RegisterListPref( - prefs::kURLsToRestoreOnStartupOld, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs_.registry()->RegisterListPref(prefs::kURLsToRestoreOnStartupOld); prefs_.registry()->RegisterStringPref( prefs::kDefaultCharset, l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING), diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc index 03f47ae..f8831e0 100644 --- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc +++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc @@ -102,19 +102,12 @@ class ProfilePrefStoreManagerTest : public testing::Test { it != kConfiguration + arraysize(kConfiguration); ++it) { if (it->strategy == PrefHashFilter::TRACKING_STRATEGY_ATOMIC) { - profile_pref_registry_->RegisterStringPref( - it->name, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + profile_pref_registry_->RegisterStringPref(it->name, std::string()); } else { - profile_pref_registry_->RegisterDictionaryPref( - it->name, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + profile_pref_registry_->RegisterDictionaryPref(it->name); } } - profile_pref_registry_->RegisterStringPref( - kUnprotectedPref, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + profile_pref_registry_->RegisterStringPref(kUnprotectedPref, std::string()); // As in chrome_pref_service_factory.cc, kPreferencesResetTime needs to be // declared as protected in order to be read from the proper store by the diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc index 9bc0c55..996adc84 100644 --- a/chrome/browser/prefs/session_startup_pref.cc +++ b/chrome/browser/prefs/session_startup_pref.cc @@ -71,16 +71,9 @@ void SessionStartupPref::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterListPref(prefs::kURLsToRestoreOnStartupOld, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kRestoreOnStartupMigrated, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kRestoreStartupURLsMigrationTime, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kURLsToRestoreOnStartupOld); + registry->RegisterBooleanPref(prefs::kRestoreOnStartupMigrated, false); + registry->RegisterInt64Pref(prefs::kRestoreStartupURLsMigrationTime, false); } // static diff --git a/chrome/browser/prefs/session_startup_pref_unittest.cc b/chrome/browser/prefs/session_startup_pref_unittest.cc index 8712435..ed08296 100644 --- a/chrome/browser/prefs/session_startup_pref_unittest.cc +++ b/chrome/browser/prefs/session_startup_pref_unittest.cc @@ -19,16 +19,10 @@ class SessionStartupPrefTest : public testing::Test { void SetUp() override { pref_service_.reset(new TestingPrefServiceSyncable); SessionStartupPref::RegisterProfilePrefs(registry()); - registry()->RegisterBooleanPref( - prefs::kHomePageIsNewTabPage, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); // Make the tests independent of the Mac startup pref migration (see // SessionStartupPref::MigrateMacDefaultPrefIfNecessary). - registry()->RegisterStringPref( - prefs::kProfileCreatedByVersion, - "22.0.0.0", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterStringPref(prefs::kProfileCreatedByVersion, "22.0.0.0"); } bool IsUseLastOpenDefault() { @@ -89,10 +83,7 @@ TEST_F(SessionStartupPrefTest, URLListManagedOverridesUser) { // (so that, in effect, the default value "Open the homepage" was selected), // their preferences are migrated on upgrade to m19. TEST_F(SessionStartupPrefTest, DefaultMigration) { - registry()->RegisterStringPref( - prefs::kHomePage, - "http://google.com/", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/"); pref_service_->SetString(prefs::kHomePage, "http://chromium.org/"); pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, false); @@ -116,10 +107,7 @@ TEST_F(SessionStartupPrefTest, DefaultMigration) { // and the NTP is being used for the homepage, their preferences are migrated // to "Open the New Tab Page" on upgrade to M19. TEST_F(SessionStartupPrefTest, DefaultMigrationHomepageIsNTP) { - registry()->RegisterStringPref( - prefs::kHomePage, - "http://google.com/", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/"); pref_service_->SetString(prefs::kHomePage, "http://chromium.org/"); pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, true); @@ -140,10 +128,7 @@ TEST_F(SessionStartupPrefTest, DefaultMigrationHomepageIsNTP) { // Checks to make sure that if the user had previously selected "Open the // "homepage", their preferences are migrated on upgrade to M19. TEST_F(SessionStartupPrefTest, HomePageMigration) { - registry()->RegisterStringPref( - prefs::kHomePage, - "http://google.com/", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/"); // By design, it's impossible to set the 'restore on startup' pref to 0 // ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it @@ -164,10 +149,7 @@ TEST_F(SessionStartupPrefTest, HomePageMigration) { // "homepage", and the NTP is being used for the homepage, their preferences // are migrated on upgrade to M19. TEST_F(SessionStartupPrefTest, HomePageMigrationHomepageIsNTP) { - registry()->RegisterStringPref( - prefs::kHomePage, - "http://google.com/", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/"); // By design, it's impossible to set the 'restore on startup' pref to 0 // ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it diff --git a/chrome/browser/prefs/tracked/dictionary_hash_store_contents.cc b/chrome/browser/prefs/tracked/dictionary_hash_store_contents.cc index 7b6f542..567b9c8 100644 --- a/chrome/browser/prefs/tracked/dictionary_hash_store_contents.cc +++ b/chrome/browser/prefs/tracked/dictionary_hash_store_contents.cc @@ -55,13 +55,8 @@ DictionaryHashStoreContents::DictionaryHashStoreContents( // static void DictionaryHashStoreContents::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - kPreferenceMACs, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - kSuperMACPref, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kPreferenceMACs); + registry->RegisterStringPref(kSuperMACPref, std::string()); } std::string DictionaryHashStoreContents::hash_store_id() const { diff --git a/chrome/browser/prefs/tracked/pref_hash_filter.cc b/chrome/browser/prefs/tracked/pref_hash_filter.cc index c833f99..b6844ff 100644 --- a/chrome/browser/prefs/tracked/pref_hash_filter.cc +++ b/chrome/browser/prefs/tracked/pref_hash_filter.cc @@ -99,8 +99,7 @@ void PrefHashFilter::RegisterProfilePrefs( // See GetResetTime for why this is a StringPref and not Int64Pref. registry->RegisterStringPref( prefs::kPreferenceResetTime, - base::Int64ToString(base::Time().ToInternalValue()), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + base::Int64ToString(base::Time().ToInternalValue())); } // static diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index 5dfc021..bf4d4ff 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -681,14 +681,8 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context, namespace print_dialog_cloud { void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kCloudPrintDialogWidth, - kDefaultWidth, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kCloudPrintDialogHeight, - kDefaultHeight, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kCloudPrintDialogWidth, kDefaultWidth); + registry->RegisterIntegerPref(prefs::kCloudPrintDialogHeight, kDefaultHeight); } // Called on the FILE or UI thread. This is the main entry point into creating diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc index 7acdff7..9c53bd2 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc @@ -56,10 +56,8 @@ KeyedService* AutomaticProfileResetterFactory::BuildServiceInstanceFor( void AutomaticProfileResetterFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kProfileResetPromptMementoInProfilePrefs, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kProfileResetPromptMementoInProfilePrefs, + ""); } bool AutomaticProfileResetterFactory:: diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc index d900b40..a818494 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc @@ -509,9 +509,7 @@ class AutomaticProfileResetterTestBase : public testing::Test { user_prefs::PrefRegistrySyncable* user_prefs_registry = profile_->GetTestingPrefService()->registry(); DCHECK(user_prefs_registry); - user_prefs_registry->RegisterStringPref( - kTestPreferencePath, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs_registry->RegisterStringPref(kTestPreferencePath, std::string()); } void SetUp() override { diff --git a/chrome/browser/profiles/chrome_version_service.cc b/chrome/browser/profiles/chrome_version_service.cc index b81b417..b5315b9 100644 --- a/chrome/browser/profiles/chrome_version_service.cc +++ b/chrome/browser/profiles/chrome_version_service.cc @@ -13,10 +13,7 @@ // static void ChromeVersionService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kProfileCreatedByVersion, - "1.0.0.0", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kProfileCreatedByVersion, "1.0.0.0"); } // static diff --git a/chrome/browser/profiles/gaia_info_update_service_factory.cc b/chrome/browser/profiles/gaia_info_update_service_factory.cc index a173d68..8c8978c 100644 --- a/chrome/browser/profiles/gaia_info_update_service_factory.cc +++ b/chrome/browser/profiles/gaia_info_update_service_factory.cc @@ -42,12 +42,8 @@ KeyedService* GAIAInfoUpdateServiceFactory::BuildServiceInstanceFor( void GAIAInfoUpdateServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* prefs) { - prefs->RegisterInt64Pref(prefs::kProfileGAIAInfoUpdateTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterStringPref(prefs::kProfileGAIAInfoPictureURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->RegisterInt64Pref(prefs::kProfileGAIAInfoUpdateTime, 0); + prefs->RegisterStringPref(prefs::kProfileGAIAInfoPictureURL, std::string()); } bool GAIAInfoUpdateServiceFactory::ServiceIsNULLWhileTesting() const { diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index c28a9800..13d0381 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -84,91 +84,44 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); #endif - registry->RegisterBooleanPref( - prefs::kSessionExitedCleanly, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kSessionExitType, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); + registry->RegisterStringPref(prefs::kSessionExitType, std::string()); registry->RegisterBooleanPref( prefs::kSafeBrowsingEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, + false); + registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, + false); + registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); + registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); registry->RegisterBooleanPref( - prefs::kSafeBrowsingExtendedReportingEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSafeBrowsingProceedAnywayDisabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSSLErrorOverrideAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kSafeBrowsingIncidentsSent, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSafeBrowsingExtendedReportingOptInAllowed, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); #if defined(ENABLE_GOOGLE_NOW) - registry->RegisterBooleanPref( - prefs::kGoogleGeolocationAccessEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kGoogleGeolocationAccessEnabled, false); #endif // This pref is intentionally outside the above #if. That flag corresponds // to the Notifier extension and does not gate the launcher page. // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827. - registry->RegisterBooleanPref( - prefs::kGoogleNowLauncherEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDisableExtensions, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); + registry->RegisterBooleanPref(prefs::kDisableExtensions, false); #if defined(ENABLE_EXTENSIONS) - registry->RegisterBooleanPref( - extensions::pref_names::kAlertsInitialized, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, + false); #endif - registry->RegisterStringPref( - prefs::kSelectFileLastDirectory, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSelectFileLastDirectory, std::string()); // TODO(wjmaclean): remove the following two prefs once migration to per- // partition zoom is complete. - registry->RegisterDoublePref( - prefs::kDefaultZoomLevelDeprecated, - 0.0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kPerHostZoomLevelsDeprecated, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - - registry->RegisterDictionaryPref( - prefs::kPartitionDefaultZoomLevel, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kPartitionPerHostZoomLevels, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultApps, - "install", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSpeechRecognitionFilterProfanities, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kProfileIconVersion, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDoublePref(prefs::kDefaultZoomLevelDeprecated, 0.0); + registry->RegisterDictionaryPref(prefs::kPerHostZoomLevelsDeprecated); + + registry->RegisterDictionaryPref(prefs::kPartitionDefaultZoomLevel); + registry->RegisterDictionaryPref(prefs::kPartitionPerHostZoomLevels); + registry->RegisterStringPref(prefs::kDefaultApps, "install"); + registry->RegisterBooleanPref(prefs::kSpeechRecognitionFilterProfanities, + true); + registry->RegisterIntegerPref(prefs::kProfileIconVersion, 0); #if defined(OS_CHROMEOS) // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both // local state and user's profile. For other platforms we maintain @@ -179,35 +132,21 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { prefs::kApplicationLocale, std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); - registry->RegisterStringPref( - prefs::kApplicationLocaleBackup, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kApplicationLocaleAccepted, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kCurrentWallpaperAppName, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kApplicationLocaleBackup, std::string()); + registry->RegisterStringPref(prefs::kApplicationLocaleAccepted, + std::string()); + registry->RegisterStringPref(prefs::kCurrentWallpaperAppName, std::string()); #endif #if defined(OS_ANDROID) - registry->RegisterBooleanPref( - prefs::kDevToolsRemoteEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDevToolsRemoteEnabled, false); #endif data_reduction_proxy::RegisterSyncableProfilePrefs(registry); #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) && !defined(OS_IOS) // Preferences related to the avatar bubble and user manager tutorials. - registry->RegisterIntegerPref( - prefs::kProfileAvatarTutorialShown, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kProfileAvatarTutorialShown, 0); #endif } diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 1ddc4fc..a491300 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -309,30 +309,12 @@ const char* const ProfileImpl::kPrefExitTypeNormal = "Normal"; // static void ProfileImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kSavingBrowserHistoryDisabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kAllowDeletingBrowserHistory, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSigninAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kForceGoogleSafeSearch, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kForceYouTubeSafetyMode, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kRecordHistory, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false); + registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory, true); + registry->RegisterBooleanPref(prefs::kSigninAllowed, true); + registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false); + registry->RegisterBooleanPref(prefs::kForceYouTubeSafetyMode, false); + registry->RegisterBooleanPref(prefs::kRecordHistory, false); registry->RegisterIntegerPref( prefs::kProfileAvatarIndex, -1, @@ -352,10 +334,7 @@ void ProfileImpl::RegisterProfilePrefs( prefs::kProfileUsingDefaultName, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kSupervisedUserId, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSupervisedUserId, std::string()); registry->RegisterStringPref(prefs::kProfileName, std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); @@ -363,33 +342,15 @@ void ProfileImpl::RegisterProfilePrefs( std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); #if defined(ENABLE_PRINTING) - registry->RegisterBooleanPref( - prefs::kPrintingEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPrintingEnabled, true); #endif - registry->RegisterBooleanPref( - prefs::kPrintPreviewDisabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kForceEphemeralProfiles, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false); + registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); // Initialize the cache prefs. - registry->RegisterFilePathPref( - prefs::kDiskCacheDir, - base::FilePath(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kDiskCacheSize, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kMediaCacheSize, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath()); + registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0); + registry->RegisterIntegerPref(prefs::kMediaCacheSize, 0); // Deprecated. Kept around for migration. registry->RegisterBooleanPref( diff --git a/chrome/browser/push_messaging/push_messaging_application_id.cc b/chrome/browser/push_messaging/push_messaging_application_id.cc index c6b30e7..3fc92db 100644 --- a/chrome/browser/push_messaging/push_messaging_application_id.cc +++ b/chrome/browser/push_messaging/push_messaging_application_id.cc @@ -25,9 +25,7 @@ const char kPushMessagingApplicationIdPrefix[] = "wp:"; // static void PushMessagingApplicationId::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kPushMessagingApplicationIdMap, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kPushMessagingApplicationIdMap); } // static diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.cc b/chrome/browser/push_messaging/push_messaging_service_impl.cc index 9953036..ea47be0 100644 --- a/chrome/browser/push_messaging/push_messaging_service_impl.cc +++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc @@ -96,10 +96,7 @@ void UnregisterCallbackToClosure( // static void PushMessagingServiceImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kPushMessagingRegistrationCount, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kPushMessagingRegistrationCount, 0); PushMessagingApplicationId::RegisterProfilePrefs(registry); } diff --git a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc index bddfbc0..3582bdc 100644 --- a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc +++ b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc @@ -80,11 +80,8 @@ bool DeviceIDFetcher::Start(const IDCallback& callback) { // static void DeviceIDFetcher::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* prefs) { - prefs->RegisterBooleanPref(prefs::kEnableDRM, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterStringPref( - prefs::kDRMSalt, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->RegisterBooleanPref(prefs::kEnableDRM, true); + prefs->RegisterStringPref(prefs::kDRMSalt, ""); } // static diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc index 1aa72ac..7324dcc 100644 --- a/chrome/browser/search/hotword_service_factory.cc +++ b/chrome/browser/search/hotword_service_factory.cc @@ -84,15 +84,9 @@ void HotwordServiceFactory::RegisterProfilePrefs( std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // Per-device settings (do not sync). - prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnSearchEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, false); + prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnSearchEnabled, false); + prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen, false); } KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc index ffab5b4..c4229d3 100644 --- a/chrome/browser/search_engines/template_url_service_factory.cc +++ b/chrome/browser/search_engines/template_url_service_factory.cc @@ -81,76 +81,39 @@ void TemplateURLServiceFactory::RegisterProfilePrefs( registry->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID, std::string(), user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDefaultSearchProviderEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderName, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderID, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderPrepopulateID, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderSuggestURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderSearchURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderInstantURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderImageURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderNewTabURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderSearchURLPostParams, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderSuggestURLPostParams, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderInstantURLPostParams, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderImageURLPostParams, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderKeyword, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderIconURL, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderEncodings, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kDefaultSearchProviderSearchTermsReplacementKey, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDefaultSearchProviderEnabled, true); + registry->RegisterStringPref(prefs::kDefaultSearchProviderName, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderID, std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderPrepopulateID, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderSuggestURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderSearchURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderInstantURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderImageURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderNewTabURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderSearchURLPostParams, + std::string()); + registry->RegisterStringPref( + prefs::kDefaultSearchProviderSuggestURLPostParams, std::string()); + registry->RegisterStringPref( + prefs::kDefaultSearchProviderInstantURLPostParams, std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderImageURLPostParams, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderKeyword, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderIconURL, + std::string()); + registry->RegisterStringPref(prefs::kDefaultSearchProviderEncodings, + std::string()); + registry->RegisterListPref(prefs::kDefaultSearchProviderAlternateURLs); + registry->RegisterStringPref( + prefs::kDefaultSearchProviderSearchTermsReplacementKey, std::string()); } content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse( diff --git a/chrome/browser/signin/about_signin_internals_factory.cc b/chrome/browser/signin/about_signin_internals_factory.cc index e209182..5d77ec8 100644 --- a/chrome/browser/signin/about_signin_internals_factory.cc +++ b/chrome/browser/signin/about_signin_internals_factory.cc @@ -58,10 +58,7 @@ void AboutSigninInternalsFactory::RegisterProfilePrefs( for (int i = UNTIMED_FIELDS_BEGIN; i < UNTIMED_FIELDS_END; ++i) { const std::string pref_path = SigninStatusFieldToString( static_cast<UntimedSigninStatusField>(i)); - user_prefs->RegisterStringPref( - pref_path.c_str(), - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterStringPref(pref_path.c_str(), std::string()); } for (int i = TIMED_FIELDS_BEGIN; i < TIMED_FIELDS_END; ++i) { @@ -69,14 +66,8 @@ void AboutSigninInternalsFactory::RegisterProfilePrefs( static_cast<TimedSigninStatusField>(i)) + ".value"; const std::string time = SigninStatusFieldToString( static_cast<TimedSigninStatusField>(i)) + ".time"; - user_prefs->RegisterStringPref( - value.c_str(), - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - user_prefs->RegisterStringPref( - time.c_str(), - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + user_prefs->RegisterStringPref(value.c_str(), std::string()); + user_prefs->RegisterStringPref(time.c_str(), std::string()); } } diff --git a/chrome/browser/signin/account_tracker_service_factory.cc b/chrome/browser/signin/account_tracker_service_factory.cc index 60ddfff..0b99976 100644 --- a/chrome/browser/signin/account_tracker_service_factory.cc +++ b/chrome/browser/signin/account_tracker_service_factory.cc @@ -39,13 +39,9 @@ AccountTrackerServiceFactory* AccountTrackerServiceFactory::GetInstance() { void AccountTrackerServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref( - AccountTrackerService::kAccountInfoPref, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kAccountIdMigrationState, - AccountTrackerService::MIGRATION_NOT_STARTED, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(AccountTrackerService::kAccountInfoPref); + registry->RegisterIntegerPref(prefs::kAccountIdMigrationState, + AccountTrackerService::MIGRATION_NOT_STARTED); } KeyedService* AccountTrackerServiceFactory::BuildServiceInstanceFor( diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc index 9af5d0c..3d5a3d5 100644 --- a/chrome/browser/signin/easy_unlock_service.cc +++ b/chrome/browser/signin/easy_unlock_service.cc @@ -261,18 +261,10 @@ EasyUnlockService::~EasyUnlockService() { // static void EasyUnlockService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kEasyUnlockAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kEasyUnlockEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kEasyUnlockPairing, - new base::DictionaryValue(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); + registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); + registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, + new base::DictionaryValue()); registry->RegisterBooleanPref( prefs::kEasyUnlockProximityRequired, false, diff --git a/chrome/browser/signin/local_auth.cc b/chrome/browser/signin/local_auth.cc index 9b20c32..5c6ea03 100644 --- a/chrome/browser/signin/local_auth.cc +++ b/chrome/browser/signin/local_auth.cc @@ -175,10 +175,8 @@ std::string LocalAuth::TruncateStringByBits(const std::string& str, void LocalAuth::RegisterLocalAuthPrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kGoogleServicesPasswordHash, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kGoogleServicesPasswordHash, + std::string()); } void LocalAuth::SetLocalAuthCredentialsWithEncoding(size_t info_index, diff --git a/chrome/browser/signin/signin_manager_factory.cc b/chrome/browser/signin/signin_manager_factory.cc index 9222645..9b5406f 100644 --- a/chrome/browser/signin/signin_manager_factory.cc +++ b/chrome/browser/signin/signin_manager_factory.cc @@ -81,53 +81,29 @@ SigninManagerFactory* SigninManagerFactory::GetInstance() { void SigninManagerFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kGoogleServicesHostedDomain, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kGoogleServicesLastUsername, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kGoogleServicesHostedDomain, + std::string()); + registry->RegisterStringPref(prefs::kGoogleServicesLastUsername, + std::string()); registry->RegisterInt64Pref( prefs::kGoogleServicesRefreshTokenAnnotateScheduledTime, - base::Time().ToInternalValue(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kGoogleServicesSigninScopedDeviceId, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kGoogleServicesAccountId, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kGoogleServicesUserAccountId, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kAutologinEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kReverseAutologinEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + base::Time().ToInternalValue()); + registry->RegisterStringPref(prefs::kGoogleServicesSigninScopedDeviceId, + std::string()); + registry->RegisterStringPref(prefs::kGoogleServicesAccountId, std::string()); + registry->RegisterStringPref(prefs::kGoogleServicesUserAccountId, + std::string()); + registry->RegisterBooleanPref(prefs::kAutologinEnabled, true); + registry->RegisterBooleanPref(prefs::kReverseAutologinEnabled, true); registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList, - new base::ListValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kSignedInTime, - base::Time().ToInternalValue(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + new base::ListValue); + registry->RegisterInt64Pref(prefs::kSignedInTime, + base::Time().ToInternalValue()); LocalAuth::RegisterLocalAuthPrefs(registry); // Deprecated prefs: will be removed in a future release. - registry->RegisterStringPref( - prefs::kGoogleServicesUsername, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kGoogleServicesUsername, std::string()); } // static diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc index a3404a9..22663ca 100644 --- a/chrome/browser/signin/signin_promo.cc +++ b/chrome/browser/signin/signin_promo.cc @@ -252,22 +252,10 @@ void ForceWebBasedSigninFlowForTesting(bool force) { void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kSignInPromoStartupCount, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSignInPromoUserSkipped, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSignInPromoShowOnFirstRunAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSignInPromoShowNTPBubble, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kSignInPromoStartupCount, 0); + registry->RegisterBooleanPref(prefs::kSignInPromoUserSkipped, false); + registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, true); + registry->RegisterBooleanPref(prefs::kSignInPromoShowNTPBubble, false); } } // namespace signin diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc index bd4ac1f..edbed40 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc @@ -71,12 +71,8 @@ void SpellcheckServiceFactory::RegisterProfilePrefs( // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. user_prefs->RegisterStringPref( prefs::kSpellCheckDictionary, - l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - user_prefs->RegisterBooleanPref( - prefs::kSpellCheckUseSpellingService, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY)); + user_prefs->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false); user_prefs->RegisterBooleanPref( prefs::kEnableContinuousSpellcheck, true, diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.cc b/chrome/browser/supervised_user/child_accounts/child_account_service.cc index ab5868f..673849d 100644 --- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc +++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc @@ -95,10 +95,7 @@ bool ChildAccountService::IsChildAccountDetectionEnabled() { void ChildAccountService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kChildAccountStatusKnown, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false); } void ChildAccountService::SetIsChildAccount(bool is_child_account) { diff --git a/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc b/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc index ddd6f29..94480d8 100644 --- a/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc +++ b/chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.cc @@ -164,9 +164,7 @@ SupervisedUserSharedSettingsService::Subscribe( // static void SupervisedUserSharedSettingsService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kSupervisedUserSharedSettings, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kSupervisedUserSharedSettings); } // static diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc index b880731..b7d4ee2 100644 --- a/chrome/browser/supervised_user/supervised_user_service.cc +++ b/chrome/browser/supervised_user/supervised_user_service.cc @@ -289,21 +289,13 @@ void SupervisedUserService::OnCustodianInfoChanged() { // static void SupervisedUserService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kSupervisedUserManualHosts, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kSupervisedUserManualURLs, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kDefaultSupervisedUserFilteringBehavior, - SupervisedUserURLFilter::ALLOW, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref(prefs::kSupervisedUserCreationAllowed, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kSupervisedUserManualHosts); + registry->RegisterDictionaryPref(prefs::kSupervisedUserManualURLs); + registry->RegisterIntegerPref(prefs::kDefaultSupervisedUserFilteringBehavior, + SupervisedUserURLFilter::ALLOW); + registry->RegisterBooleanPref(prefs::kSupervisedUserCreationAllowed, true); for (const char* pref : kCustodianInfoPrefs) { - registry->RegisterStringPref(pref, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(pref, std::string()); } } diff --git a/chrome/browser/supervised_user/supervised_user_whitelist_service.cc b/chrome/browser/supervised_user/supervised_user_whitelist_service.cc index 73840c7..c8fd104 100644 --- a/chrome/browser/supervised_user/supervised_user_whitelist_service.cc +++ b/chrome/browser/supervised_user/supervised_user_whitelist_service.cc @@ -43,9 +43,7 @@ SupervisedUserWhitelistService::~SupervisedUserWhitelistService() { // static void SupervisedUserWhitelistService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kSupervisedUserWhitelists, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kSupervisedUserWhitelists); } void SupervisedUserWhitelistService::Init() { diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc index b08fba6..1858854 100644 --- a/chrome/browser/themes/theme_service_factory.cc +++ b/chrome/browser/themes/theme_service_factory.cc @@ -75,31 +75,17 @@ void ThemeServiceFactory::RegisterProfilePrefs( default_uses_system_theme = linux_ui->GetDefaultUsesSystemTheme(); #endif - registry->RegisterBooleanPref( - prefs::kUsesSystemTheme, - default_uses_system_theme, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kUsesSystemTheme, + default_uses_system_theme); #endif - registry->RegisterFilePathPref( - prefs::kCurrentThemePackFilename, - base::FilePath(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kCurrentThemeID, - ThemeService::kDefaultThemeID, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kCurrentThemeImages, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kCurrentThemeColors, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kCurrentThemeTints, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kCurrentThemeDisplayProperties, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterFilePathPref(prefs::kCurrentThemePackFilename, + base::FilePath()); + registry->RegisterStringPref(prefs::kCurrentThemeID, + ThemeService::kDefaultThemeID); + registry->RegisterDictionaryPref(prefs::kCurrentThemeImages); + registry->RegisterDictionaryPref(prefs::kCurrentThemeColors); + registry->RegisterDictionaryPref(prefs::kCurrentThemeTints); + registry->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties); } content::BrowserContext* ThemeServiceFactory::GetBrowserContextToUse( diff --git a/chrome/browser/ui/app_list/app_list_prefs.cc b/chrome/browser/ui/app_list/app_list_prefs.cc index 47f62a9..e4c37de 100644 --- a/chrome/browser/ui/app_list/app_list_prefs.cc +++ b/chrome/browser/ui/app_list/app_list_prefs.cc @@ -73,8 +73,7 @@ AppListPrefs::~AppListPrefs() { // static void AppListPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - kPrefModel, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kPrefModel); } // static diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc index 3d60817..ed925e7 100644 --- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc +++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc @@ -57,28 +57,15 @@ void RegisterChromeLauncherUserPrefs( registry->RegisterStringPref(prefs::kShelfAutoHideBehavior, kShelfAutoHideBehaviorNever, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kShelfAutoHideBehaviorLocal, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kShelfAutoHideBehaviorLocal, + std::string()); registry->RegisterStringPref(prefs::kShelfAlignment, kShelfAlignmentBottom, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kShelfAlignmentLocal, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kShelfPreferences, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kLogoutDialogDurationMs, - 20000, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kShowLogoutButtonInTray, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kShelfAlignmentLocal, std::string()); + registry->RegisterDictionaryPref(prefs::kShelfPreferences); + registry->RegisterIntegerPref(prefs::kLogoutDialogDurationMs, 20000); + registry->RegisterBooleanPref(prefs::kShowLogoutButtonInTray, false); } base::DictionaryValue* CreateAppDict(const std::string& app_id) { diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc index 9edc021..13bef78 100644 --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc @@ -40,10 +40,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { // late: we need the pref to be already initialized. Doing it here also saves // us from having to hard-code pref registration in the several unit tests // that use this preference. - registry->RegisterBooleanPref( - prefs::kShowUpdatePromotionInfoBar, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true); #endif registry->RegisterBooleanPref( prefs::kDeleteBrowsingHistory, @@ -77,91 +74,35 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { prefs::kDeleteTimePeriod, 0, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kLastClearBrowsingDataTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref(prefs::kModuleConflictBubbleShown, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kCheckDefaultBrowser, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebAppCreateOnDesktop, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebAppCreateInAppsMenu, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebAppCreateInQuickLaunchBar, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterInt64Pref(prefs::kLastClearBrowsingDataTime, 0); + registry->RegisterIntegerPref(prefs::kModuleConflictBubbleShown, 0); + registry->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); + registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); + registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); + registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); registry->RegisterBooleanPref( prefs::kEnableTranslate, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kCloudPrintEmail, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kCloudPrintProxyEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kCloudPrintSubmitEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDevToolsDisabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kBrowserWindowPlacement, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kBrowserWindowPlacementPopup, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - prefs::kAppWindowPlacement, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportAutofillFormData, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportBookmarks, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportHistory, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportHomepage, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportSavedPasswords, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kImportSearchEngine, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); + registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true); + registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true); + registry->RegisterBooleanPref(prefs::kDevToolsDisabled, false); + registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); + registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup); + registry->RegisterDictionaryPref(prefs::kAppWindowPlacement); + registry->RegisterBooleanPref(prefs::kImportAutofillFormData, true); + registry->RegisterBooleanPref(prefs::kImportBookmarks, true); + registry->RegisterBooleanPref(prefs::kImportHistory, true); + registry->RegisterBooleanPref(prefs::kImportHomepage, true); + registry->RegisterBooleanPref(prefs::kImportSavedPasswords, true); + registry->RegisterBooleanPref(prefs::kImportSearchEngine, true); registry->RegisterBooleanPref( prefs::kEnableDoNotTrack, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); #if defined(ENABLE_WEBRTC) - registry->RegisterBooleanPref( - prefs::kWebRTCMultipleRoutesEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true); #endif // Dictionaries to keep track of default tasks in the file browser. @@ -174,27 +115,12 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { // We need to register the type of these preferences in order to query // them even though they're only typically controlled via policy. - registry->RegisterBooleanPref( - prefs::kPluginsAllowOutdated, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPluginsAlwaysAuthorize, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kClearPluginLSODataEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kHideWebStoreIcon, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); + registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false); + registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true); + registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false); #if !defined(OS_MACOSX) - registry->RegisterBooleanPref( - prefs::kFullscreenAllowed, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true); #endif } diff --git a/chrome/browser/ui/browser_view_prefs.cc b/chrome/browser/ui/browser_view_prefs.cc index 175b0c7..636cde5 100644 --- a/chrome/browser/ui/browser_view_prefs.cc +++ b/chrome/browser/ui/browser_view_prefs.cc @@ -46,10 +46,8 @@ void RegisterBrowserViewProfilePrefs( custom_frame_default = ui::GetCustomFramePrefDefault(); #endif - registry->RegisterBooleanPref( - prefs::kUseCustomChromeFrame, - custom_frame_default, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, + custom_frame_default); } void MigrateBrowserTabStripPrefs(PrefService* prefs) { diff --git a/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm b/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm index c67b35a..38d94ad 100644 --- a/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm +++ b/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm @@ -29,10 +29,8 @@ class WindowSizeAutosaverTest : public CocoaProfileTest { defer:NO]; // TODO(joi): Do all registration up front. static_cast<user_prefs::PrefRegistrySyncable*>( - profile()->GetPrefs()->DeprecatedGetPrefRegistry())-> - RegisterDictionaryPref( - path_, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + profile()->GetPrefs()->DeprecatedGetPrefRegistry()) + ->RegisterDictionaryPref(path_); } void TearDown() override { diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc index 810cfa1..3f9927b 100644 --- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc +++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc @@ -205,8 +205,7 @@ void GesturePrefsObserverFactoryAura::RegisterOverscrollPrefs( for (size_t i = 0; i < overscroll_prefs.size(); ++i) { registry->RegisterDoublePref( overscroll_prefs[i].pref_name, - content::GetOverscrollConfig(overscroll_prefs[i].config), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + content::GetOverscrollConfig(overscroll_prefs[i].config)); } } @@ -215,24 +214,17 @@ void GesturePrefsObserverFactoryAura::RegisterProfilePrefs( GestureConfiguration* gesture_config = GestureConfiguration::GetInstance(); registry->RegisterIntegerPref( prefs::kFlingMaxCancelToDownTimeInMs, - gesture_config->fling_max_cancel_to_down_time_in_ms(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kFlingMaxTapGapTimeInMs, - gesture_config->fling_max_tap_gap_time_in_ms(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + gesture_config->fling_max_cancel_to_down_time_in_ms()); + registry->RegisterIntegerPref(prefs::kFlingMaxTapGapTimeInMs, + gesture_config->fling_max_tap_gap_time_in_ms()); registry->RegisterIntegerPref( prefs::kTabScrubActivationDelayInMs, - gesture_config->tab_scrub_activation_delay_in_ms(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kSemiLongPressTimeInMs, - gesture_config->semi_long_press_time_in_ms(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + gesture_config->tab_scrub_activation_delay_in_ms()); + registry->RegisterIntegerPref(prefs::kSemiLongPressTimeInMs, + gesture_config->semi_long_press_time_in_ms()); registry->RegisterDoublePref( prefs::kMaxSeparationForGestureTouchesInPixels, - gesture_config->max_separation_for_gesture_touches_in_pixels(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + gesture_config->max_separation_for_gesture_touches_in_pixels()); RegisterOverscrollPrefs(registry); } diff --git a/chrome/browser/ui/network_profile_bubble.cc b/chrome/browser/ui/network_profile_bubble.cc index e6a6b1b..29aaa76 100644 --- a/chrome/browser/ui/network_profile_bubble.cc +++ b/chrome/browser/ui/network_profile_bubble.cc @@ -159,14 +159,9 @@ void NetworkProfileBubble::SetNotificationShown(bool shown) { // static void NetworkProfileBubble::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kNetworkProfileWarningsLeft, - kMaxWarnings, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kNetworkProfileLastWarningTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kNetworkProfileWarningsLeft, + kMaxWarnings); + registry->RegisterInt64Pref(prefs::kNetworkProfileLastWarningTime, 0); } // static diff --git a/chrome/browser/ui/passwords/password_bubble_experiment.cc b/chrome/browser/ui/passwords/password_bubble_experiment.cc index 8afabfc..1ccd086 100644 --- a/chrome/browser/ui/passwords/password_bubble_experiment.cc +++ b/chrome/browser/ui/passwords/password_bubble_experiment.cc @@ -26,10 +26,7 @@ const char kExperimentName[] = "PasswordBubbleAlgorithm"; const char kParamNopeThreshold[] = "consecutive_nope_threshold"; void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kPasswordBubbleNopesCount, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kPasswordBubbleNopesCount, 0); } bool ShouldShowNeverForThisSiteDefault(PrefService* prefs) { diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc index e32e65f..a614dd9 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -124,10 +124,7 @@ ALL_FONT_SCRIPTS(WEBKIT_WEBPREFS_FONTS_STANDARD) if (fonts_with_defaults.find(pref_name) == fonts_with_defaults.end()) { // We haven't already set a default value for this font preference, so set // an empty string as the default. - registry->RegisterStringPref( - pref_name, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(pref_name, std::string()); } } } @@ -327,13 +324,12 @@ void OverrideFontFamily(WebPreferences* prefs, void RegisterLocalizedFontPref(user_prefs::PrefRegistrySyncable* registry, const char* path, - int default_message_id, - uint32 flags) { + int default_message_id) { int val = 0; bool success = base::StringToInt(l10n_util::GetStringUTF8( default_message_id), &val); DCHECK(success); - registry->RegisterIntegerPref(path, val, flags); + registry->RegisterIntegerPref(path, val); } } // namespace @@ -523,71 +519,37 @@ void PrefsTabHelper::InitIncognitoUserPrefStore( void PrefsTabHelper::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { WebPreferences pref_defaults; + registry->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled, + pref_defaults.javascript_enabled); + registry->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled, + pref_defaults.web_security_enabled); registry->RegisterBooleanPref( - prefs::kWebKitJavascriptEnabled, - pref_defaults.javascript_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitWebSecurityEnabled, - pref_defaults.web_security_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitJavascriptCanOpenWindowsAutomatically, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitLoadsImagesAutomatically, - pref_defaults.loads_images_automatically, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitPluginsEnabled, - pref_defaults.plugins_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitDomPasteEnabled, - pref_defaults.dom_paste_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitShrinksStandaloneImagesToFit, - pref_defaults.shrinks_standalone_images_to_fit, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitTextAreasAreResizable, - pref_defaults.text_areas_are_resizable, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitJavaEnabled, - pref_defaults.java_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebkitTabsToLinks, - pref_defaults.tabs_to_links, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitAllowRunningInsecureContent, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitAllowDisplayingInsecureContent, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kEnableReferrers, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kWebKitJavascriptCanOpenWindowsAutomatically, true); + registry->RegisterBooleanPref(prefs::kWebKitLoadsImagesAutomatically, + pref_defaults.loads_images_automatically); + registry->RegisterBooleanPref(prefs::kWebKitPluginsEnabled, + pref_defaults.plugins_enabled); + registry->RegisterBooleanPref(prefs::kWebKitDomPasteEnabled, + pref_defaults.dom_paste_enabled); + registry->RegisterBooleanPref(prefs::kWebKitShrinksStandaloneImagesToFit, + pref_defaults.shrinks_standalone_images_to_fit); + registry->RegisterBooleanPref(prefs::kWebKitTextAreasAreResizable, + pref_defaults.text_areas_are_resizable); + registry->RegisterBooleanPref(prefs::kWebKitJavaEnabled, + pref_defaults.java_enabled); + registry->RegisterBooleanPref(prefs::kWebkitTabsToLinks, + pref_defaults.tabs_to_links); + registry->RegisterBooleanPref(prefs::kWebKitAllowRunningInsecureContent, + false); + registry->RegisterBooleanPref(prefs::kWebKitAllowDisplayingInsecureContent, + true); + registry->RegisterBooleanPref(prefs::kEnableReferrers, true); #if defined(OS_ANDROID) - registry->RegisterDoublePref( - prefs::kWebKitFontScaleFactor, - 1.0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitForceEnableZoom, - pref_defaults.force_enable_zoom, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kWebKitPasswordEchoEnabled, - pref_defaults.password_echo_enabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDoublePref(prefs::kWebKitFontScaleFactor, 1.0); + registry->RegisterBooleanPref(prefs::kWebKitForceEnableZoom, + pref_defaults.force_enable_zoom); + registry->RegisterBooleanPref(prefs::kWebKitPasswordEchoEnabled, + pref_defaults.password_echo_enabled); #endif registry->RegisterStringPref( prefs::kAcceptLanguages, @@ -627,10 +589,8 @@ void PrefsTabHelper::RegisterProfilePrefs( // prefs (e.g., via the extensions workflow), or the problem turns out to // not be really critical after all. if (browser_script != pref_script) { - registry->RegisterStringPref( - pref.pref_name, - l10n_util::GetStringUTF8(pref.resource_id), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(pref.pref_name, + l10n_util::GetStringUTF8(pref.resource_id)); fonts_with_defaults.insert(pref.pref_name); } } @@ -640,38 +600,22 @@ void PrefsTabHelper::RegisterProfilePrefs( RegisterFontFamilyPrefs(registry, fonts_with_defaults); #endif - RegisterLocalizedFontPref( - registry, - prefs::kWebKitDefaultFontSize, - IDS_DEFAULT_FONT_SIZE, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - RegisterLocalizedFontPref( - registry, - prefs::kWebKitDefaultFixedFontSize, - IDS_DEFAULT_FIXED_FONT_SIZE, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - RegisterLocalizedFontPref( - registry, - prefs::kWebKitMinimumFontSize, - IDS_MINIMUM_FONT_SIZE, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - RegisterLocalizedFontPref( - registry, - prefs::kWebKitMinimumLogicalFontSize, - IDS_MINIMUM_LOGICAL_FONT_SIZE, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFontSize, + IDS_DEFAULT_FONT_SIZE); + RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFixedFontSize, + IDS_DEFAULT_FIXED_FONT_SIZE); + RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumFontSize, + IDS_MINIMUM_FONT_SIZE); + RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumLogicalFontSize, + IDS_MINIMUM_LOGICAL_FONT_SIZE); registry->RegisterBooleanPref( prefs::kWebKitUsesUniversalDetector, l10n_util::GetStringUTF8(IDS_USES_UNIVERSAL_DETECTOR) == "true", user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterStringPref( prefs::kStaticEncodings, - l10n_util::GetStringUTF8(IDS_STATIC_ENCODING_LIST), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kRecentlySelectedEncoding, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + l10n_util::GetStringUTF8(IDS_STATIC_ENCODING_LIST)); + registry->RegisterStringPref(prefs::kRecentlySelectedEncoding, std::string()); } // static diff --git a/chrome/browser/ui/startup/autolaunch_prompt_win.cc b/chrome/browser/ui/startup/autolaunch_prompt_win.cc index 50a7324..7f3559a 100644 --- a/chrome/browser/ui/startup/autolaunch_prompt_win.cc +++ b/chrome/browser/ui/startup/autolaunch_prompt_win.cc @@ -167,9 +167,7 @@ bool ShowAutolaunchPrompt(Browser* browser) { } void RegisterAutolaunchUserPrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kShownAutoLaunchInfobar, 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kShownAutoLaunchInfobar, 0); } } // namespace chrome diff --git a/chrome/browser/ui/tabs/pinned_tab_codec.cc b/chrome/browser/ui/tabs/pinned_tab_codec.cc index 922d86a..af46b1d 100644 --- a/chrome/browser/ui/tabs/pinned_tab_codec.cc +++ b/chrome/browser/ui/tabs/pinned_tab_codec.cc @@ -103,8 +103,7 @@ static bool DecodeTab(const base::DictionaryValue& value, StartupTab* tab) { // static void PinnedTabCodec::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kPinnedTabs, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kPinnedTabs); } // static diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc index eee58ea..619d07d 100644 --- a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc +++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc @@ -154,10 +154,8 @@ void ToolbarActionsBar::RegisterProfilePrefs( prefs::kToolbarIconSurfacingBubbleAcknowledged, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kToolbarIconSurfacingBubbleLastShowTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterInt64Pref(prefs::kToolbarIconSurfacingBubbleLastShowTime, + 0); } gfx::Size ToolbarActionsBar::GetPreferredSize() const { diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc index 4d503dd..0918de1 100644 --- a/chrome/browser/ui/webui/flags_ui.cc +++ b/chrome/browser/ui/webui/flags_ui.cc @@ -333,8 +333,7 @@ void FlagsUI::RegisterPrefs(PrefRegistrySimple* registry) { #if defined(OS_CHROMEOS) // static void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kEnabledLabsExperiments, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kEnabledLabsExperiments); } #endif diff --git a/chrome/browser/ui/webui/instant_ui.cc b/chrome/browser/ui/webui/instant_ui.cc index ef8e551..162ac8c 100644 --- a/chrome/browser/ui/webui/instant_ui.cc +++ b/chrome/browser/ui/webui/instant_ui.cc @@ -172,8 +172,6 @@ InstantUI::InstantUI(content::WebUI* web_ui) : WebUIController(web_ui) { // static void InstantUI::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kInstantUIZeroSuggestUrlPrefix, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kInstantUIZeroSuggestUrlPrefix, + std::string()); } diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc index a11ad9e..d0adc4a 100644 --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc @@ -58,9 +58,7 @@ ForeignSessionHandler::ForeignSessionHandler() { // static void ForeignSessionHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kNtpCollapsedForeignSessions, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kNtpCollapsedForeignSessions); } // static diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc index e8e8a3f..9deda8c 100644 --- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc @@ -290,7 +290,5 @@ std::string MostVisitedHandler::GetDictionaryKeyForUrl(const std::string& url) { // static void MostVisitedHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kNtpMostVisitedURLsBlacklist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kNtpMostVisitedURLsBlacklist); } diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc index 4d16b74..aef4044 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc @@ -172,10 +172,7 @@ void NewTabPageHandler::HandleLogTimeToClick(const base::ListValue* args) { void NewTabPageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { // TODO(estade): should be syncable. - registry->RegisterIntegerPref( - prefs::kNtpShownPage, - APPS_PAGE_ID, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kNtpShownPage, APPS_PAGE_ID); } // static diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index b4f084e..9d5d824 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -521,10 +521,7 @@ base::RefCountedMemory* PluginsUI::GetFaviconResourceBytes( // static void PluginsUI::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kPluginsShowDetails, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPluginsShowDetails, false); registry->RegisterDictionaryPref( prefs::kContentSettingsPluginWhitelist, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); diff --git a/chrome/browser/ui/webui/print_preview/sticky_settings.cc b/chrome/browser/ui/webui/print_preview/sticky_settings.cc index 073f78b..e9077b1 100644 --- a/chrome/browser/ui/webui/print_preview/sticky_settings.cc +++ b/chrome/browser/ui/webui/print_preview/sticky_settings.cc @@ -61,9 +61,7 @@ void StickySettings::RestoreFromPrefs(PrefService* prefs) { void StickySettings::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kPrintPreviewStickySettings, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kPrintPreviewStickySettings); } std::string* StickySettings::printer_app_state() { diff --git a/chrome/browser/web_resource/notification_promo.cc b/chrome/browser/web_resource/notification_promo.cc index a71c0e7..cdae454 100644 --- a/chrome/browser/web_resource/notification_promo.cc +++ b/chrome/browser/web_resource/notification_promo.cc @@ -326,8 +326,7 @@ void NotificationPromo::RegisterProfilePrefs( // TODO(dbeam): Registered only for migration. Remove in M28 when // we're reasonably sure all prefs are gone. // http://crbug.com/168887 - registry->RegisterDictionaryPref( - kPrefPromoObject, user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kPrefPromoObject); } // static diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc index 140dff0..3fdeda2 100644 --- a/chrome/browser/web_resource/promo_resource_service.cc +++ b/chrome/browser/web_resource/promo_resource_service.cc @@ -71,10 +71,7 @@ void PromoResourceService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { // TODO(dbeam): This is registered only for migration; remove in M28 // when all prefs have been cleared. http://crbug.com/168887 - registry->RegisterStringPref( - prefs::kNtpPromoResourceCacheUpdate, - "0", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kNtpPromoResourceCacheUpdate, "0"); NotificationPromo::RegisterProfilePrefs(registry); } diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index 17a1722..c0a5bff 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc @@ -166,10 +166,8 @@ void AutofillManager::RegisterProfilePrefs( prefs::kAutofillEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kAutofillWalletSyncExperimentEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAutofillWalletSyncExperimentEnabled, + false); // TODO(estade): Should this be syncable? registry->RegisterBooleanPref( prefs::kAutofillWalletImportEnabled, @@ -177,44 +175,27 @@ void AutofillManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // This choice is made on a per-device basis, so it's not syncable. registry->RegisterBooleanPref( - prefs::kAutofillWalletImportStorageCheckboxState, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kAutofillWalletImportStorageCheckboxState, true); #if defined(OS_MACOSX) registry->RegisterBooleanPref( prefs::kAutofillAuxiliaryProfilesEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); #else // defined(OS_MACOSX) - registry->RegisterBooleanPref( - prefs::kAutofillAuxiliaryProfilesEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAutofillAuxiliaryProfilesEnabled, + false); #endif // defined(OS_MACOSX) #if defined(OS_MACOSX) - registry->RegisterBooleanPref( - prefs::kAutofillMacAddressBookQueried, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAutofillMacAddressBookQueried, false); #endif // defined(OS_MACOSX) - registry->RegisterDoublePref( - prefs::kAutofillPositiveUploadRate, - kAutofillPositiveUploadRateDefaultValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDoublePref( - prefs::kAutofillNegativeUploadRate, - kAutofillNegativeUploadRateDefaultValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDoublePref(prefs::kAutofillPositiveUploadRate, + kAutofillPositiveUploadRateDefaultValue); + registry->RegisterDoublePref(prefs::kAutofillNegativeUploadRate, + kAutofillNegativeUploadRateDefaultValue); #if defined(OS_MACOSX) && !defined(OS_IOS) - registry->RegisterBooleanPref( - prefs::kAutofillUseMacAddressBook, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kAutofillMacAddressBookShowedCount, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAutofillUseMacAddressBook, false); + registry->RegisterIntegerPref(prefs::kAutofillMacAddressBookShowedCount, 0); #endif // defined(OS_MACOSX) && !defined(OS_IOS) } diff --git a/components/autofill/core/browser/autofill_test_utils.cc b/components/autofill/core/browser/autofill_test_utils.cc index c69611a..a8be18b 100644 --- a/components/autofill/core/browser/autofill_test_utils.cc +++ b/components/autofill/core/browser/autofill_test_utils.cc @@ -40,19 +40,14 @@ scoped_ptr<PrefService> PrefServiceForTesting() { // PDM depends on this pref, which is normally registered in // SigninManagerFactory. - registry->RegisterStringPref( - ::prefs::kGoogleServicesAccountId, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(::prefs::kGoogleServicesAccountId, + std::string()); // PDM depends on these prefs, which are normally registered in // AccountTrackerServiceFactory. - registry->RegisterListPref( - AccountTrackerService::kAccountInfoPref, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - ::prefs::kAccountIdMigrationState, - AccountTrackerService::MIGRATION_NOT_STARTED, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(AccountTrackerService::kAccountInfoPref); + registry->RegisterIntegerPref(::prefs::kAccountIdMigrationState, + AccountTrackerService::MIGRATION_NOT_STARTED); base::PrefServiceFactory factory; factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore())); diff --git a/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc b/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc index 28bc794..379e4ec 100644 --- a/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc +++ b/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc @@ -24,10 +24,8 @@ scoped_ptr<PrefService> PrefServiceForTesting() { scoped_refptr<user_prefs::PrefRegistrySyncable> registry( new user_prefs::PrefRegistrySyncable()); registry->RegisterListPref(prefs::kBookmarkEditorExpandedNodes, - new base::ListValue, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedBookmarks, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + new base::ListValue); + registry->RegisterListPref(prefs::kManagedBookmarks); base::PrefServiceFactory factory; factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore())); return factory.Create(registry.get()); diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc index 758f19f..ccd5ebb 100644 --- a/components/bookmarks/browser/bookmark_utils.cc +++ b/components/bookmarks/browser/bookmark_utils.cc @@ -393,10 +393,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { prefs::kShowBookmarkBar, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kEditBookmarksEnabled, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); registry->RegisterBooleanPref( prefs::kShowAppsShortcutInBookmarkBar, true, diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc index d6246c7..39c5a2e2 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc @@ -139,10 +139,8 @@ void DefaultProvider::RegisterProfilePrefs( // Whether the deprecated mediastream default setting has already been // migrated into microphone and camera default settings. - registry->RegisterBooleanPref( - prefs::kMigratedDefaultMediaStreamSetting, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kMigratedDefaultMediaStreamSetting, + false); } DefaultProvider::DefaultProvider(PrefService* prefs, bool incognito) diff --git a/components/content_settings/core/browser/content_settings_policy_provider.cc b/components/content_settings/core/browser/content_settings_policy_provider.cc index 8c65dbd..a398a6c 100644 --- a/components/content_settings/core/browser/content_settings_policy_provider.cc +++ b/components/content_settings/core/browser/content_settings_policy_provider.cc @@ -122,68 +122,38 @@ namespace content_settings { // static void PolicyProvider::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kManagedAutoSelectCertificateForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedCookiesAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedCookiesBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedCookiesSessionOnlyForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedImagesAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedImagesBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedJavaScriptAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedJavaScriptBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedPluginsAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedPluginsBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedPopupsAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedPopupsBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedNotificationsAllowedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kManagedNotificationsBlockedForUrls, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kManagedAutoSelectCertificateForUrls); + registry->RegisterListPref(prefs::kManagedCookiesAllowedForUrls); + registry->RegisterListPref(prefs::kManagedCookiesBlockedForUrls); + registry->RegisterListPref(prefs::kManagedCookiesSessionOnlyForUrls); + registry->RegisterListPref(prefs::kManagedImagesAllowedForUrls); + registry->RegisterListPref(prefs::kManagedImagesBlockedForUrls); + registry->RegisterListPref(prefs::kManagedJavaScriptAllowedForUrls); + registry->RegisterListPref(prefs::kManagedJavaScriptBlockedForUrls); + registry->RegisterListPref(prefs::kManagedPluginsAllowedForUrls); + registry->RegisterListPref(prefs::kManagedPluginsBlockedForUrls); + registry->RegisterListPref(prefs::kManagedPopupsAllowedForUrls); + registry->RegisterListPref(prefs::kManagedPopupsBlockedForUrls); + registry->RegisterListPref(prefs::kManagedNotificationsAllowedForUrls); + registry->RegisterListPref(prefs::kManagedNotificationsBlockedForUrls); // Preferences for default content setting policies. If a policy is not set of // the corresponding preferences below is set to CONTENT_SETTING_DEFAULT. - registry->RegisterIntegerPref( - prefs::kManagedDefaultCookiesSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultImagesSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultJavaScriptSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultPluginsSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultPopupsSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultGeolocationSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultNotificationsSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kManagedDefaultMediaStreamSetting, - CONTENT_SETTING_DEFAULT, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kManagedDefaultCookiesSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultImagesSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultJavaScriptSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultPluginsSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultPopupsSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultGeolocationSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultNotificationsSetting, + CONTENT_SETTING_DEFAULT); + registry->RegisterIntegerPref(prefs::kManagedDefaultMediaStreamSetting, + CONTENT_SETTING_DEFAULT); } PolicyProvider::PolicyProvider(PrefService* prefs) : prefs_(prefs) { diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc index 6f7c006..0b56355 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.cc +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc @@ -112,15 +112,12 @@ void PrefProvider::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref( prefs::kContentSettingsVersion, - ContentSettingsPattern::kContentSettingsPatternVersion, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + ContentSettingsPattern::kContentSettingsPatternVersion); registry->RegisterDictionaryPref( prefs::kContentSettingsPatternPairs, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kMigratedContentSettingsPatternPairs, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kMigratedContentSettingsPatternPairs, + false); for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { registry->RegisterDictionaryPref( diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc index 39f70ee..73dd809 100644 --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc @@ -106,10 +106,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, // static void HostContentSettingsMap::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kContentSettingsWindowLastTabIndex, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, 0); // Register the prefs for the content settings providers. content_settings::DefaultProvider::RegisterProfilePrefs(registry); diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc index 00acd88..2b59e3a 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc @@ -30,69 +30,35 @@ namespace data_reduction_proxy { // Make sure any changes here that have the potential to impact android_webview // are reflected in RegisterSimpleProfilePrefs. void RegisterSyncableProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kDataReductionProxyEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDataReductionProxyAltEnabled, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kDataReductionProxyWasEnabledBefore, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kDataReductionProxyEnabled, false); + registry->RegisterBooleanPref(prefs::kDataReductionProxyAltEnabled, false); + registry->RegisterBooleanPref(prefs::kDataReductionProxyWasEnabledBefore, + false); - registry->RegisterInt64Pref( - prefs::kHttpReceivedContentLength, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kHttpOriginalContentLength, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterInt64Pref(prefs::kHttpReceivedContentLength, 0); + registry->RegisterInt64Pref(prefs::kHttpOriginalContentLength, 0); - registry->RegisterBooleanPref( - prefs::kStatisticsPrefsMigrated, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kStatisticsPrefsMigrated, false); registry->RegisterBooleanPref(prefs::kUpdateDailyReceivedContentLengths, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyHttpOriginalContentLength, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyHttpReceivedContentLength, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref( - prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + false); + registry->RegisterListPref(prefs::kDailyHttpOriginalContentLength); + registry->RegisterListPref(prefs::kDailyHttpReceivedContentLength); registry->RegisterListPref( - prefs::kDailyContentLengthWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyOriginalContentLengthWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthHttpsWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthShortBypassWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthLongBypassWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyOriginalContentLengthViaDataReductionProxy, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyContentLengthUnknownWithDataReductionProxyEnabled); registry->RegisterListPref( - prefs::kDailyContentLengthViaDataReductionProxy, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kDailyHttpContentLengthLastUpdateDate, - 0L, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + prefs::kDailyOriginalContentLengthViaDataReductionProxy); + registry->RegisterListPref(prefs::kDailyContentLengthViaDataReductionProxy); + registry->RegisterInt64Pref(prefs::kDailyHttpContentLengthLastUpdateDate, 0L); } void RegisterSimpleProfilePrefs(PrefRegistrySimple* registry) { diff --git a/components/enhanced_bookmarks/bookmark_server_cluster_service.cc b/components/enhanced_bookmarks/bookmark_server_cluster_service.cc index e433717..b0e0dcd 100644 --- a/components/enhanced_bookmarks/bookmark_server_cluster_service.cc +++ b/components/enhanced_bookmarks/bookmark_server_cluster_service.cc @@ -112,9 +112,7 @@ const std::vector<std::string> BookmarkServerClusterService::GetClusters() // static void BookmarkServerClusterService::RegisterPrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - prefs::kBookmarkClusters, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(prefs::kBookmarkClusters); } scoped_ptr<net::URLFetcher> BookmarkServerClusterService::CreateFetcher() { diff --git a/components/gcm_driver/gcm_channel_status_syncer.cc b/components/gcm_driver/gcm_channel_status_syncer.cc index 852922d..4e29222 100644 --- a/components/gcm_driver/gcm_channel_status_syncer.cc +++ b/components/gcm_driver/gcm_channel_status_syncer.cc @@ -68,18 +68,11 @@ void GCMChannelStatusSyncer::RegisterPrefs(PrefRegistrySimple* registry) { // static void GCMChannelStatusSyncer::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kGCMChannelStatus, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kGCMChannelStatus, true); registry->RegisterIntegerPref( prefs::kGCMChannelPollIntervalSeconds, - GCMChannelStatusRequest::default_poll_interval_seconds(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kGCMChannelLastCheckTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + GCMChannelStatusRequest::default_poll_interval_seconds()); + registry->RegisterInt64Pref(prefs::kGCMChannelLastCheckTime, 0); } // static diff --git a/components/invalidation/invalidator_storage.cc b/components/invalidation/invalidator_storage.cc index 13ba4b1..cd7ae9c 100644 --- a/components/invalidation/invalidator_storage.cc +++ b/components/invalidation/invalidator_storage.cc @@ -57,21 +57,14 @@ namespace invalidation { // static void InvalidatorStorage::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(prefs::kInvalidatorSavedInvalidations, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kInvalidatorInvalidationState, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kInvalidatorClientId, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(prefs::kInvalidatorSavedInvalidations); + registry->RegisterStringPref(prefs::kInvalidatorInvalidationState, + std::string()); + registry->RegisterStringPref(prefs::kInvalidatorClientId, std::string()); // This pref is obsolete. We register it so we can clear it. // At some point in the future, it will be safe to remove this. - registry->RegisterListPref(kInvalidatorMaxInvalidationVersions, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(kInvalidatorMaxInvalidationVersions); } // static diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc index a42f4f2..2a0aff7 100644 --- a/components/password_manager/core/browser/password_manager.cc +++ b/components/password_manager/core/browser/password_manager.cc @@ -96,14 +96,10 @@ void PasswordManager::RegisterProfilePrefs( prefs::kPasswordManagerSavingEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPasswordManagerAutoSignin, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kPasswordManagerAllowShowPasswords, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kPasswordManagerAutoSignin, true); + registry->RegisterBooleanPref(prefs::kPasswordManagerAllowShowPasswords, + true); + registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains); } #if defined(OS_WIN) diff --git a/components/policy/core/browser/url_blacklist_manager.cc b/components/policy/core/browser/url_blacklist_manager.cc index 631ac7c..4e39e4e 100644 --- a/components/policy/core/browser/url_blacklist_manager.cc +++ b/components/policy/core/browser/url_blacklist_manager.cc @@ -510,10 +510,8 @@ bool URLBlacklistManager::IsRequestBlocked( // static void URLBlacklistManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterListPref(policy_prefs::kUrlBlacklist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(policy_prefs::kUrlWhitelist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(policy_prefs::kUrlBlacklist); + registry->RegisterListPref(policy_prefs::kUrlWhitelist); } } // namespace policy diff --git a/components/search_engines/default_search_manager.cc b/components/search_engines/default_search_manager.cc index 9adc184..c71ffad 100644 --- a/components/search_engines/default_search_manager.cc +++ b/components/search_engines/default_search_manager.cc @@ -100,9 +100,7 @@ DefaultSearchManager::~DefaultSearchManager() { // static void DefaultSearchManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - kDefaultSearchProviderDataPrefName, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kDefaultSearchProviderDataPrefName); } // static diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc index c1add44..5d79f66 100644 --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc @@ -1184,16 +1184,9 @@ bool SameDomain(const GURL& given_url, const GURL& prepopulated_url) { // Global functions ----------------------------------------------------------- void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - prefs::kCountryIDAtInstall, - kCountryIDUnknown, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(prefs::kSearchProviderOverrides, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterIntegerPref( - prefs::kSearchProviderOverridesVersion, - -1, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown); + registry->RegisterListPref(prefs::kSearchProviderOverrides); + registry->RegisterIntegerPref(prefs::kSearchProviderOverridesVersion, -1); } int GetDataVersion(PrefService* prefs) { diff --git a/components/suggestions/blacklist_store.cc b/components/suggestions/blacklist_store.cc index 304df2f..c9245e7 100644 --- a/components/suggestions/blacklist_store.cc +++ b/components/suggestions/blacklist_store.cc @@ -212,9 +212,7 @@ void BlacklistStore::FilterSuggestions(SuggestionsProfile* profile) { // static void BlacklistStore::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kSuggestionsBlacklist, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSuggestionsBlacklist, std::string()); } diff --git a/components/suggestions/suggestions_store.cc b/components/suggestions/suggestions_store.cc index 8685a64..42d6dc5 100644 --- a/components/suggestions/suggestions_store.cc +++ b/components/suggestions/suggestions_store.cc @@ -99,9 +99,7 @@ void SuggestionsStore::ClearSuggestions() { // static void SuggestionsStore::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref( - prefs::kSuggestionsData, std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSuggestionsData, std::string()); } } // namespace suggestions diff --git a/components/sync_driver/sync_prefs.cc b/components/sync_driver/sync_prefs.cc index 4f1b27f..c28a213 100644 --- a/components/sync_driver/sync_prefs.cc +++ b/components/sync_driver/sync_prefs.cc @@ -35,30 +35,15 @@ SyncPrefs::~SyncPrefs() { DCHECK(CalledOnValidThread()); } // static void SyncPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref( - prefs::kSyncHasSetupCompleted, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterBooleanPref( - prefs::kSyncSuppressStart, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kSyncLastSyncedTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterInt64Pref( - prefs::kSyncFirstSyncTime, - 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSyncHasSetupCompleted, false); + registry->RegisterBooleanPref(prefs::kSyncSuppressStart, false); + registry->RegisterInt64Pref(prefs::kSyncLastSyncedTime, 0); + registry->RegisterInt64Pref(prefs::kSyncFirstSyncTime, 0); // All datatypes are on by default, but this gets set explicitly // when you configure sync (when turning it on), in // ProfileSyncService::OnUserChoseDatatypes. - registry->RegisterBooleanPref( - prefs::kSyncKeepEverythingSynced, - true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSyncKeepEverythingSynced, true); syncer::ModelTypeSet user_types = syncer::UserTypes(); @@ -81,38 +66,20 @@ void SyncPrefs::RegisterProfilePrefs( RegisterDataTypePreferredPref(registry, it.Get(), false); } - registry->RegisterBooleanPref( - prefs::kSyncManaged, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kSyncEncryptionBootstrapToken, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterStringPref( - prefs::kSyncKeystoreEncryptionBootstrapToken, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSyncManaged, false); + registry->RegisterStringPref(prefs::kSyncEncryptionBootstrapToken, + std::string()); + registry->RegisterStringPref(prefs::kSyncKeystoreEncryptionBootstrapToken, + std::string()); #if defined(OS_CHROMEOS) - registry->RegisterStringPref( - prefs::kSyncSpareBootstrapToken, - "", - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSyncSpareBootstrapToken, ""); #endif - registry->RegisterBooleanPref( - prefs::kSyncHasAuthError, - false, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSyncHasAuthError, false); - registry->RegisterStringPref( - prefs::kSyncSessionsGUID, - std::string(), - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterStringPref(prefs::kSyncSessionsGUID, std::string()); - registry->RegisterIntegerPref( - prefs::kSyncRemainingRollbackTries, 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(prefs::kSyncRemainingRollbackTries, 0); } void SyncPrefs::AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer) { @@ -394,10 +361,7 @@ void SyncPrefs::RegisterDataTypePreferredPref( NOTREACHED(); return; } - registry->RegisterBooleanPref( - pref_name, - is_preferred, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(pref_name, is_preferred); } bool SyncPrefs::GetDataTypePreferred(syncer::ModelType type) const { diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc index a957756..d31dab4 100644 --- a/components/translate/core/browser/translate_prefs.cc +++ b/components/translate/core/browser/translate_prefs.cc @@ -389,9 +389,7 @@ void TranslatePrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterListPref(kPrefTranslateBlockedLanguages, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterDictionaryPref( - kPrefTranslateLastDeniedTimeForLanguage, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kPrefTranslateLastDeniedTimeForLanguage); registry->RegisterDictionaryPref( kPrefTranslateTooOftenDeniedForLanguage, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index c7409b3..88c32ea 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -1895,27 +1895,18 @@ bool ExtensionPrefs::NeedsStorageGarbageCollection() { // static void ExtensionPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterDictionaryPref( - pref_names::kExtensions, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(pref_names::kExtensions); registry->RegisterListPref(pref_names::kToolbar, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterIntegerPref( pref_names::kToolbarSize, -1, // default value user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - kExtensionsBlacklistUpdate, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(pref_names::kInstallAllowList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(pref_names::kInstallDenyList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - pref_names::kInstallForceList, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(pref_names::kAllowedTypes, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kExtensionsBlacklistUpdate); + registry->RegisterListPref(pref_names::kInstallAllowList); + registry->RegisterListPref(pref_names::kInstallDenyList); + registry->RegisterDictionaryPref(pref_names::kInstallForceList); + registry->RegisterListPref(pref_names::kAllowedTypes); registry->RegisterBooleanPref( pref_names::kStorageGarbageCollect, false, // default value @@ -1928,20 +1919,15 @@ void ExtensionPrefs::RegisterProfilePrefs( pref_names::kNextUpdateCheck, 0, // default value user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(pref_names::kAllowedInstallSites, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(pref_names::kAllowedInstallSites); registry->RegisterStringPref( pref_names::kLastChromeVersion, std::string(), // default value user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterDictionaryPref( - kInstallSignature, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterDictionaryPref(kInstallSignature); - registry->RegisterListPref(pref_names::kNativeMessagingBlacklist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); - registry->RegisterListPref(pref_names::kNativeMessagingWhitelist, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterListPref(pref_names::kNativeMessagingBlacklist); + registry->RegisterListPref(pref_names::kNativeMessagingWhitelist); registry->RegisterBooleanPref( pref_names::kNativeMessagingUserLevelHosts, true, // default value @@ -1952,9 +1938,7 @@ void ExtensionPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); #if !defined(OS_MACOSX) - registry->RegisterBooleanPref( - pref_names::kAppFullscreenAllowed, true, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterBooleanPref(pref_names::kAppFullscreenAllowed, true); #endif } diff --git a/ios/chrome/browser/first_run/first_run.mm b/ios/chrome/browser/first_run/first_run.mm index b817662..39de142 100644 --- a/ios/chrome/browser/first_run/first_run.mm +++ b/ios/chrome/browser/first_run/first_run.mm @@ -73,7 +73,5 @@ const char* FirstRun::GetPingDelayPrefName() { // static void FirstRun::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterIntegerPref( - GetPingDelayPrefName(), 0, - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + registry->RegisterIntegerPref(GetPingDelayPrefName(), 0); } |