summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/url_pattern.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 22:51:54 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 22:51:54 +0000
commitd2a69e2fccc65e8c74b770343cecad7a1136f9fd (patch)
treeefc684e21d7ef65d72dcb31fba6a01184df8407b /chrome/common/extensions/url_pattern.h
parenta60551c712b36d6241c234cd81ae2a847f323ec5 (diff)
downloadchromium_src-d2a69e2fccc65e8c74b770343cecad7a1136f9fd.zip
chromium_src-d2a69e2fccc65e8c74b770343cecad7a1136f9fd.tar.gz
chromium_src-d2a69e2fccc65e8c74b770343cecad7a1136f9fd.tar.bz2
Integrate URLPattern with Extension user scripts.
Also refactored the UserScript class in UserScriptSlave and the UserScriptInfo structure in UserScriptMaster into a common location. Review URL: http://codereview.chromium.org/21070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/url_pattern.h')
-rw-r--r--chrome/common/extensions/url_pattern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/common/extensions/url_pattern.h b/chrome/common/extensions/url_pattern.h
index 0be9660..4778016 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -46,7 +46,7 @@
//
// From a 2008-ish crawl of userscripts.org, the following patterns were found
// in @include lines:
-// - total lines : 24271
+// - total lines : 24471
// - @include * : 919
// - @include http://[^\*]+?/ : 11128 (no star in host)
// - @include http://\*\.[^\*]+?/ : 2325 (host prefixed by *.)
@@ -77,6 +77,8 @@ class URLPattern {
// Returns true if this instance matches the specified URL.
bool MatchesUrl(const GURL& url);
+ std::string GetAsString() const;
+
// Get the scheme the pattern matches. This will always return a valid scheme
// if is_valid() returns true.
std::string scheme() const { return scheme_; }