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

Unified Diff: extensions/common/url_pattern.h

Issue 12792005: Allow extensions on chrome:// URLs, when flag is set and permission is explicitly requested (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove allowed_schemes attribute from url_pattern; go back to re-using valid_schemes Created 7 years, 9 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 a6dfa7480af2e2514060623c5b79968cd5b0f661..7d55b8da1fd7a982d677fbc8b7e179902ac92bd7 100644
--- a/extensions/common/url_pattern.h
+++ b/extensions/common/url_pattern.h
@@ -188,6 +188,9 @@ class URLPattern {
// Get an error string for a ParseResult.
static const char* GetParseResultString(URLPattern::ParseResult parse_result);
+ // Checks whether the bit is set for the given scheme in the given scheme mask
+ static bool IsSchemeBitSet(const std::string& scheme, const int mask);
+
private:
// Returns true if any of the |schemes| items matches our scheme.
bool MatchesAnyScheme(const std::vector<std::string>& schemes) const;
@@ -206,8 +209,7 @@ class URLPattern {
// A bitmask containing the schemes which are considered valid for this
// pattern. Parse() uses this to decide whether a pattern contains a valid
- // scheme. MatchesScheme uses this to decide whether a wildcard scheme_
- // matches a given test scheme.
+ // scheme.
int valid_schemes_;
// True if this is a special-case "<all_urls>" pattern.
« chrome/common/extensions/extension.cc ('K') | « chrome/common/extensions/user_script.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698