summaryrefslogtreecommitdiffstats
path: root/chrome/browser/host_content_settings_map.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 07:32:14 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 07:32:14 +0000
commitdecdd511099c41390b0cfc8859bf93bc1a628e0a (patch)
treecd5ba0ec818289b57b76bdebf51bd78c0f87a49c /chrome/browser/host_content_settings_map.cc
parenta7a7735b1c0b8a4b1c9d40ede057e9081ef3c6a1 (diff)
downloadchromium_src-decdd511099c41390b0cfc8859bf93bc1a628e0a.zip
chromium_src-decdd511099c41390b0cfc8859bf93bc1a628e0a.tar.gz
chromium_src-decdd511099c41390b0cfc8859bf93bc1a628e0a.tar.bz2
Clear non-wildcard content settings before setting from bubble or prompt.
BUG=42359 TEST=manual Review URL: http://codereview.chromium.org/1707011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/host_content_settings_map.cc')
-rw-r--r--chrome/browser/host_content_settings_map.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc
index 11a080e..40c117e 100644
--- a/chrome/browser/host_content_settings_map.cc
+++ b/chrome/browser/host_content_settings_map.cc
@@ -47,6 +47,12 @@ HostContentSettingsMap::Pattern HostContentSettingsMap::Pattern::FromURL(
std::string(kDomainWildcard) + url.host());
}
+// static
+HostContentSettingsMap::Pattern
+ HostContentSettingsMap::Pattern::FromURLNoWildcard(const GURL& url) {
+ return Pattern(net::GetHostOrSpecFromURL(url));
+}
+
bool HostContentSettingsMap::Pattern::IsValid() const {
if (pattern_.empty())
return false;