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

Unified Diff: chrome/browser/extensions/api/content_settings/content_settings_store.cc

Issue 2423003002: Delete fullscreen/mouselock pref data associated with extensions. (Closed)
Patch Set: Fix confusing wording. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/content_settings/content_settings_store.cc
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.cc b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
index ec745236e3aa79851817ea5871cd23869b491a77..6d75b6c62e059854b3f8462d1e857d2a34f988e9 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_store.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
@@ -116,10 +116,9 @@ void ContentSettingsStore::SetExtensionContentSetting(
}
}
- // Send notification that content settings changed.
- // TODO(markusheintz): Notifications should only be sent if the set content
- // setting is effective and not hidden by another setting of another
- // extension installed more recently.
+ // Send notification that content settings changed. (Note: This is responsible
+ // for updating the pref store, so cannot be skipped even if the setting would
+ // be masked by another extension.)
NotifyOfContentSettingChanged(ext_id,
scope != kExtensionPrefsScopeRegular);
}
@@ -320,6 +319,14 @@ void ContentSettingsStore::SetExtensionContentSettingFromList(
dict->GetString(keys::kContentSettingsTypeKey, &content_settings_type_str);
ContentSettingsType content_settings_type =
helpers::StringToContentSettingsType(content_settings_type_str);
+ if (content_settings_type == CONTENT_SETTINGS_TYPE_FULLSCREEN ||
+ content_settings_type == CONTENT_SETTINGS_TYPE_MOUSELOCK) {
+ // Fullscreen and mouselock are deprecated. Skip over settings of these
+ // types, effectively deleting them from the in-memory model. This will
+ // implicitly delete these old settings from the pref store when it is
+ // written back.
+ continue;
+ }
DCHECK_NE(CONTENT_SETTINGS_TYPE_DEFAULT, content_settings_type);
std::string resource_identifier;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698