diff options
author | raymes <raymes@chromium.org> | 2015-04-26 20:00:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-27 03:00:34 +0000 |
commit | aa60872e346eaf354bb15dbd698546b1bdddd132 (patch) | |
tree | e50fc508527b8776881858d1068a2262516b1792 /components | |
parent | a1b45c39dbf749704b4fd6e3aabcb6d8405cd6d9 (diff) | |
download | chromium_src-aa60872e346eaf354bb15dbd698546b1bdddd132.zip chromium_src-aa60872e346eaf354bb15dbd698546b1bdddd132.tar.gz chromium_src-aa60872e346eaf354bb15dbd698546b1bdddd132.tar.bz2 |
Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF
Now that we have added PrefRegistry registration functions that do not need to
accept a flags argument, passing PrefRegistrySyncable::UNSYNCABLE_PREF is
redundant and we can remove it altogether.
Ran the following command:
for x in $(git ls-files | grep -E "\.(cc|h|mm)$") ; do perl -0777 -i -pe 's/,[ \n]*(user_prefs::)+PrefRegistrySyncable::UNSYNCABLE_PREF//igs' $x ; done && git cl format
There are still some occurences that need to be manually fixed.
BUG=476800
Review URL: https://codereview.chromium.org/1102733002
Cr-Commit-Position: refs/heads/master@{#326993}
Diffstat (limited to 'components')
20 files changed, 112 insertions, 286 deletions
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); |