Chromium Code Reviews| Index: extensions/common/url_pattern.cc |
| diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc |
| index 735e71e9fa0298704005aa12e3f11fd8fabbc86e..8fa79309b34b9660ed77d00d68845f41a41936fd 100644 |
| --- a/extensions/common/url_pattern.cc |
| +++ b/extensions/common/url_pattern.cc |
| @@ -466,6 +466,10 @@ bool URLPattern::ImpliesAllHosts() const { |
| return registry_length > 0; |
| } |
| +bool URLPattern::MatchesSingleOrigin() const { |
| + return !(ImpliesAllHosts() || match_subdomains_); |
|
not at google - send to devlin
2014/08/11 22:59:30
nit: I find negation of nested conditions harder t
gpdavis
2014/08/12 00:52:05
Done.
|
| +} |
| + |
| bool URLPattern::MatchesPath(const std::string& test) const { |
| // Make the behaviour of OverlapsWith consistent with MatchesURL, which is |
| // need to match hosted apps on e.g. 'google.com' also run on 'google.com/'. |