From d2a69e2fccc65e8c74b770343cecad7a1136f9fd Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Thu, 5 Feb 2009 22:51:54 +0000 Subject: 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 --- chrome/common/extensions/url_pattern.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/common/extensions/url_pattern.h') 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_; } -- cgit v1.1