Index: extensions/common/url_pattern.cc |
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc |
index 735e71e9fa0298704005aa12e3f11fd8fabbc86e..61f8024d58af07a3a0fe6855b6cebfbf9e3eea7a 100644 |
--- a/extensions/common/url_pattern.cc |
+++ b/extensions/common/url_pattern.cc |
@@ -466,6 +466,11 @@ bool URLPattern::ImpliesAllHosts() const { |
return registry_length > 0; |
} |
+bool URLPattern::MatchesSingleOrigin() const { |
+ // We ignore the port because it's not all that interesting. |
+ return !ImpliesAllHosts() && scheme_ != "*" && !match_subdomains_; |
+} |
+ |
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/'. |