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

Unified Diff: extensions/common/url_pattern.cc

Issue 352523003: Have the Debugger extension api check that it has access to the tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « extensions/common/url_pattern.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern.cc
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index c7a3711e039fee6a7eb5b0f1c79ea7e111b2dd3f..ee7d16467107525c13ced6ae59469947d3099ef2 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),
« no previous file with comments | « extensions/common/url_pattern.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698