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

Unified Diff: extensions/common/url_pattern.h

Issue 348313003: Create withheld permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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.h
diff --git a/extensions/common/url_pattern.h b/extensions/common/url_pattern.h
index b4c566bf5c316a46ea060425c9cb476574e1c8e5..63550fd9258814bce90be4e6814bb73a3fa349a9 100644
--- a/extensions/common/url_pattern.h
+++ b/extensions/common/url_pattern.h
@@ -153,6 +153,13 @@ class URLPattern {
// Returns true if |test| matches our path.
bool MatchesPath(const std::string& test) const;
+ // Returns true if the pattern is vague enough that it implies all hosts,
+ // such as *://*/*.
+ // This is an expensive method, and should be used sparingly!
+ // You should probably use URLPatternSet::ShouldWarnAllHosts(), which is
+ // cached.
+ bool ImpliesAllHosts() const;
+
// Sets the port. Returns false if the port is invalid.
bool SetPort(const std::string& port);
const std::string& port() const { return port_; }

Powered by Google App Engine
This is Rietveld 408576698