diff options
author | raymes <raymes@chromium.org> | 2015-04-28 22:59:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 05:59:54 +0000 |
commit | a40ea6cba96b8d14a715bc1c45a8c8a77724ca94 (patch) | |
tree | 439d94736a7459b6f476e76495d849ffbdef5d98 /components/content_settings | |
parent | 14c59714c821b5c05a4b8a088b65f0a2fef4b910 (diff) | |
download | chromium_src-a40ea6cba96b8d14a715bc1c45a8c8a77724ca94.zip chromium_src-a40ea6cba96b8d14a715bc1c45a8c8a77724ca94.tar.gz chromium_src-a40ea6cba96b8d14a715bc1c45a8c8a77724ca94.tar.bz2 |
Manually remove all existing 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.
BUG=476800
Review URL: https://codereview.chromium.org/1092683004
Cr-Commit-Position: refs/heads/master@{#327439}
Diffstat (limited to 'components/content_settings')
-rw-r--r-- | components/content_settings/core/browser/content_settings_default_provider.cc | 13 | ||||
-rw-r--r-- | components/content_settings/core/browser/content_settings_pref_provider.cc | 13 |
2 files changed, 14 insertions, 12 deletions
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 39c5a2e2..d85a28e 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc @@ -12,6 +12,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/metrics/histogram.h" +#include "base/prefs/pref_registry.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" #include "components/content_settings/core/browser/content_settings_rule.h" @@ -122,12 +123,12 @@ void DefaultProvider::RegisterProfilePrefs( // after two stable releases. for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { ContentSettingsType type = static_cast<ContentSettingsType>(i); - registry->RegisterIntegerPref( - GetPrefName(type), - GetDefaultValue(type), - IsContentSettingsTypeSyncable(type) - ? user_prefs::PrefRegistrySyncable::SYNCABLE_PREF - : user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); + if (IsContentSettingsTypeSyncable(type)) { + registry->RegisterIntegerPref(GetPrefName(type), GetDefaultValue(type), + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } else { + registry->RegisterIntegerPref(GetPrefName(type), GetDefaultValue(type)); + } } // Whether the deprecated dictionary preference has already been migrated 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 0b56355..2319578 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.cc +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc @@ -13,6 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/metrics/histogram.h" +#include "base/prefs/pref_registry.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/strings/string_split.h" @@ -120,12 +121,12 @@ void PrefProvider::RegisterProfilePrefs( false); for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { - registry->RegisterDictionaryPref( - kContentSettingsExceptionsPrefs[i], - IsContentSettingsTypeSyncable(ContentSettingsType(i)) - ? user_prefs::PrefRegistrySyncable::SYNCABLE_PREF - : user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF - ); + if (IsContentSettingsTypeSyncable(ContentSettingsType(i))) { + registry->RegisterDictionaryPref(kContentSettingsExceptionsPrefs[i], + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } else { + registry->RegisterDictionaryPref(kContentSettingsExceptionsPrefs[i]); + } } } |