Index: chrome/common/extensions/url_pattern.cc |
diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc |
index c0b04b7cf6eceb963b0693720c35d305849e8300..7a239b63d7b3415d1bf5f4cddc29ca72456a84bf 100644 |
--- a/chrome/common/extensions/url_pattern.cc |
+++ b/chrome/common/extensions/url_pattern.cc |
@@ -97,14 +97,12 @@ bool IsValidPortForScheme(const std::string scheme, const std::string& port) { |
URLPattern::URLPattern() |
: valid_schemes_(SCHEME_NONE), |
match_all_urls_(false), |
- partial_filesystem_support_hack_(false), |
match_subdomains_(false), |
port_("*") {} |
URLPattern::URLPattern(int valid_schemes) |
: valid_schemes_(valid_schemes), |
match_all_urls_(false), |
- partial_filesystem_support_hack_(false), |
match_subdomains_(false), |
port_("*") {} |
@@ -113,7 +111,6 @@ URLPattern::URLPattern(int valid_schemes, const std::string& pattern) |
// appropriate when we know |pattern| is valid. |
: valid_schemes_(valid_schemes), |
match_all_urls_(false), |
- partial_filesystem_support_hack_(false), |
match_subdomains_(false), |
port_("*") { |
if (PARSE_SUCCESS != Parse(pattern)) |
@@ -301,11 +298,11 @@ bool URLPattern::MatchesURL(const GURL& test) const { |
const GURL* test_url = &test; |
bool has_inner_url = test.inner_url() != NULL; |
- if (partial_filesystem_support_hack_ != has_inner_url) |
- return false; |
- |
- if (has_inner_url) |
+ if (has_inner_url) { |
+ if (!test.SchemeIsFileSystem()) |
Aaron Boodman
2012/05/02 20:03:08
Can this go in MatchesScheme instead, so that the
|
+ return false; // The only nested URLs we handle are filesystem URLs. |
test_url = test.inner_url(); |
+ } |
if (!MatchesScheme(test_url->scheme())) |
return false; |
@@ -449,10 +446,6 @@ bool URLPattern::OverlapsWith(const URLPattern& other) const { |
DCHECK(path_.find('*') == path_.size() - 1); |
DCHECK(other.path().find('*') == other.path().size() - 1); |
- if (partial_filesystem_support_hack_ != |
- other.partial_filesystem_support_hack()) |
- return false; |
- |
if (!MatchesPath(other.path().substr(0, other.path().size() - 1)) && |
!other.MatchesPath(path_.substr(0, path_.size() - 1))) |
return false; |