summaryrefslogtreecommitdiffstats
path: root/extensions/common/url_pattern.h
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-07 23:26:19 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-07 23:26:19 +0000
commit23a85362dfcde394dd17d7158423dfde35c20ca4 (patch)
treee4b43c3d0027510e86443488b63cac3a2f0e7770 /extensions/common/url_pattern.h
parent801c8663dacdcaccaf8b01efceb78989c56cba87 (diff)
downloadchromium_src-23a85362dfcde394dd17d7158423dfde35c20ca4.zip
chromium_src-23a85362dfcde394dd17d7158423dfde35c20ca4.tar.gz
chromium_src-23a85362dfcde394dd17d7158423dfde35c20ca4.tar.bz2
Add a withheld permissions model to PermissionsData. Withheld permissions are the permissions which were requested by the extension, but not granted due to how dangerous/powerful they are. Currently, these withheld permissions are only used for all hosts, and only behind the scripts_require_action flag.
BUG=362353 Review URL: https://codereview.chromium.org/348313003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/url_pattern.h')
-rw-r--r--extensions/common/url_pattern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/common/url_pattern.h b/extensions/common/url_pattern.h
index b4c566b..63550fd 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_; }