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

Unified Diff: chrome/browser/host_content_settings_map.cc

Issue 2868059: Preparatory work for adding content exceptions from the tab cookie view. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 5 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 | « chrome/browser/host_content_settings_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/host_content_settings_map.cc
diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc
index 611b645acb36efe96cf810dc86437357a37d676b..874223818dc7fd4abddcb336fd4fa9aecd507004 100644
--- a/chrome/browser/host_content_settings_map.cc
+++ b/chrome/browser/host_content_settings_map.cc
@@ -406,6 +406,18 @@ void HostContentSettingsMap::SetContentSetting(const Pattern& pattern,
NotifyObservers(ContentSettingsDetails(pattern));
}
+void HostContentSettingsMap::AddExceptionForURL(
+ const GURL& url,
+ ContentSettingsType content_type,
+ ContentSetting setting) {
+ // Make sure there is no entry that would override the pattern we are about
+ // to insert for exactly this URL.
+ SetContentSetting(Pattern::FromURLNoWildcard(url),
+ content_type,
+ CONTENT_SETTING_DEFAULT);
+ SetContentSetting(Pattern::FromURL(url), content_type, setting);
+}
+
void HostContentSettingsMap::ClearSettingsForOneType(
ContentSettingsType content_type) {
DCHECK(kTypeNames[content_type] != NULL); // Don't call this for Geolocation.
« no previous file with comments | « chrome/browser/host_content_settings_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698