Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: extensions/common/url_pattern.cc

Issue 396033002: Support "always allow" for runtime script execution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring, minor changes Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/common/url_pattern.cc
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 735e71e9fa0298704005aa12e3f11fd8fabbc86e..19bfbfecb566702ffc8598deb3d89bde04b83282 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 scheme_ != "*" && !ImpliesAllHosts() && !match_subdomains_;
not at google - send to devlin 2014/08/12 19:49:27 you should check the port here as well. and as a
gpdavis 2014/08/12 21:19:55 When I test this out (logging the visible url's po
not at google - send to devlin 2014/08/12 23:13:18 Ah ok. Yeah, forget about port, whatever. Just com
gpdavis 2014/08/13 00:08:24 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/'.

Powered by Google App Engine
This is Rietveld 408576698