summaryrefslogtreecommitdiffstats
path: root/chrome/common/content_settings_pattern.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 18:14:50 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 18:14:50 +0000
commita786f3821e677c027fb43c8ae47e0e5f8e8f71c3 (patch)
tree4a1bafb84bc8ba2342e2433949965d999571a3f4 /chrome/common/content_settings_pattern.cc
parent42973b953187b9315d6e325ccd58af44118fc5e2 (diff)
downloadchromium_src-a786f3821e677c027fb43c8ae47e0e5f8e8f71c3.zip
chromium_src-a786f3821e677c027fb43c8ae47e0e5f8e8f71c3.tar.gz
chromium_src-a786f3821e677c027fb43c8ae47e0e5f8e8f71c3.tar.bz2
Make third-party cookie blocking take precedence over any rules that match all hosts.
Previously, it would only take precedence over rules that match all origins ("*"). BUG=133768 TEST=see bug for manual test. Review URL: https://chromiumcodereview.appspot.com/10574045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/content_settings_pattern.cc')
-rw-r--r--chrome/common/content_settings_pattern.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc
index dbe70af..f5aa898 100644
--- a/chrome/common/content_settings_pattern.cc
+++ b/chrome/common/content_settings_pattern.cc
@@ -478,6 +478,10 @@ bool ContentSettingsPattern::Matches(
return true;
}
+bool ContentSettingsPattern::MatchesAllHosts() const {
+ return parts_.has_domain_wildcard && parts_.host.empty();
+}
+
const std::string ContentSettingsPattern::ToString() const {
if (IsValid())
return content_settings::PatternParser::ToString(parts_);