summaryrefslogtreecommitdiffstats
path: root/extensions/common/url_pattern.cc
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 17:14:50 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 17:14:50 +0000
commit684a212a93141908bcc10f4bc57f3edb53d2d21f (patch)
treee12d381daf0f763f76f6e16bb11c05a92ff6d71b /extensions/common/url_pattern.cc
parentbbed7dc56b4afa044a3b14804aa9f82fb0c250ce (diff)
downloadchromium_src-684a212a93141908bcc10f4bc57f3edb53d2d21f.zip
chromium_src-684a212a93141908bcc10f4bc57f3edb53d2d21f.tar.gz
chromium_src-684a212a93141908bcc10f4bc57f3edb53d2d21f.tar.bz2
Have the Debugger extension api check that it has access to the tab
Check PermissionsData::CanAccessTab() prior to attaching the debugger. BUG=367567 Review URL: https://codereview.chromium.org/352523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/url_pattern.cc')
-rw-r--r--extensions/common/url_pattern.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index c7a3711..ee7d164 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -109,6 +109,15 @@ std::string StripTrailingWildcard(const std::string& path) {
} // namespace
+// static
+bool URLPattern::IsValidSchemeForExtensions(const std::string& scheme) {
+ for (size_t i = 0; i < arraysize(kValidSchemes); ++i) {
+ if (scheme == kValidSchemes[i])
+ return true;
+ }
+ return false;
+}
+
URLPattern::URLPattern()
: valid_schemes_(SCHEME_NONE),
match_all_urls_(false),