diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-26 07:32:14 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-26 07:32:14 +0000 |
commit | decdd511099c41390b0cfc8859bf93bc1a628e0a (patch) | |
tree | cd5ba0ec818289b57b76bdebf51bd78c0f87a49c /chrome/browser/host_content_settings_map.cc | |
parent | a7a7735b1c0b8a4b1c9d40ede057e9081ef3c6a1 (diff) | |
download | chromium_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.cc | 6 |
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; |