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

Unified Diff: chrome/common/extensions/url_pattern.h

Issue 7049032: Make URLPattern::OverlapsWith handle wildcards better by expanding them to explicit schemes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « no previous file | chrome/common/extensions/url_pattern.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/url_pattern.h
diff --git a/chrome/common/extensions/url_pattern.h b/chrome/common/extensions/url_pattern.h
index cf89382b8e9b8d151e5998f3df1dd75e35371543..c0a8a6bdb7aed5f49e51737fb2642c6c1e9fab02 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -234,6 +234,13 @@ class URLPattern {
URLPattern();
#endif
+ // Returns true if any of the |schemes| items matches our scheme.
+ bool MatchesAnyScheme(const std::vector<std::string>& schemes) const;
+
+ // If the URLPattern contains a wildcard scheme, returns a list of
+ // equivalent literal schemes, otherwise returns the current scheme.
+ std::vector<std::string> GetExplicitSchemes() const;
+
// 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_
« no previous file with comments | « no previous file | chrome/common/extensions/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698