diff options
author | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-27 17:14:50 +0000 |
---|---|---|
committer | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-27 17:14:50 +0000 |
commit | 684a212a93141908bcc10f4bc57f3edb53d2d21f (patch) | |
tree | e12d381daf0f763f76f6e16bb11c05a92ff6d71b /extensions/common/url_pattern.cc | |
parent | bbed7dc56b4afa044a3b14804aa9f82fb0c250ce (diff) | |
download | chromium_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.cc | 9 |
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), |