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

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

Issue 2932007: Use WebCore's built in support for user styles (Closed)
Patch Set: whoops Created 10 years, 5 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 ba4bdeaaa2216101cc13a30a999cce1a202eba48..9d7f72fdfe78ab1542855ddf99b9793f33b9afed 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -5,6 +5,7 @@
#define CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_
#include <string>
+#include <vector>
#include "googleurl/src/gurl.h"
@@ -118,6 +119,10 @@ class URLPattern {
path_escaped_ = "";
}
+ // Returns true if this pattern matches all urls.
+ bool match_all_urls() const { return match_all_urls_; }
+ void set_match_all_urls(bool val) { match_all_urls_ = val; }
+
// Initializes this instance by parsing the provided string. On failure, the
// instance will have some intermediate values and is in an invalid state.
bool Parse(const std::string& pattern_str);
@@ -155,6 +160,12 @@ class URLPattern {
// would result in the same answer.
bool OverlapsWith(const URLPattern& other) const;
+ // Conver this URLPattern into an equivalent set of URLPatterns that don't use
+ // a wildcard in the scheme component. If this URLPattern doesn't use a
+ // wildcard scheme, then the returned set will contain one element that is
+ // equivalent to this instance.
+ std::vector<URLPattern> ConvertToExplicitSchemes() const;
+
private:
// A bitmask containing the schemes which are considered valid for this
// pattern. Parse() uses this to decide whether a pattern contains a valid
« 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