| Index: components/content_settings/core/browser/content_settings_pref_provider.cc
|
| 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 8d451633e2c74e43f097bb7f6c52349dfea9e8e3..843bbedcae25cbdbe5a7787a82f93b608fc1d692 100644
|
| --- a/components/content_settings/core/browser/content_settings_pref_provider.cc
|
| +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc
|
| @@ -33,6 +33,22 @@
|
|
|
| namespace content_settings {
|
|
|
| +namespace {
|
| +
|
| +// These settings are no longer used, and should be deleted on profile startup.
|
| +// NOTE: Do not use the CONTENT_SETTINGS_TYPE_* constants, as these will soon be
|
| +// deleted.
|
| +#if !defined(OS_IOS)
|
| +const char kObsoleteFullscreenExceptionsPref[] =
|
| + "profile.content_settings.exceptions.fullscreen";
|
| +#if !defined(OS_ANDROID)
|
| +const char kObsoleteMouseLockExceptionsPref[] =
|
| + "profile.content_settings.exceptions.mouselock";
|
| +#endif // !defined(OS_ANDROID)
|
| +#endif // !defined(OS_IOS)
|
| +
|
| +} // namespace
|
| +
|
| // ////////////////////////////////////////////////////////////////////////////
|
| // PrefProvider:
|
| //
|
| @@ -67,6 +83,8 @@ PrefProvider::PrefProvider(PrefService* prefs, bool incognito)
|
| return;
|
| }
|
|
|
| + DiscardObsoletePreferences();
|
| +
|
| pref_change_registrar_.Init(prefs_);
|
|
|
| WebsiteSettingsRegistry* website_settings =
|
| @@ -187,4 +205,15 @@ void PrefProvider::Notify(
|
| resource_identifier);
|
| }
|
|
|
| +void PrefProvider::DiscardObsoletePreferences() {
|
| + // These prefs aren't registered on iOS/Android so they can't (and don't need
|
| + // to) be deleted.
|
| +#if !defined(OS_IOS)
|
| + prefs_->ClearPref(kObsoleteFullscreenExceptionsPref);
|
| +#if !defined(OS_ANDROID)
|
| + prefs_->ClearPref(kObsoleteMouseLockExceptionsPref);
|
| +#endif // !defined(OS_ANDROID)
|
| +#endif // !defined(OS_IOS)
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|