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

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

Issue 8800006: Support chrome-extension:// scheme in URLPattern. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed merge issues in unit tests Created 9 years 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 | « chrome/common/extensions/docs/webRequest.html ('k') | 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 ef01c1b6ee8db2ef105cc525325b8306edc98deb..094c472ce483bd23e1ed86c573b40e2eb8ca9698 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -15,7 +15,8 @@ class GURL;
// subset of URL syntax:
//
// <url-pattern> := <scheme>://<host><port><path> | '<all_urls>'
-// <scheme> := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome'
+// <scheme> := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome' |
+// 'chrome-extension' | 'filesystem'
// <host> := '*' | '*.' <anychar except '/' and '*'>+
// <port> := [':' ('*' | <port number between 0 and 65535>)]
// <path> := '/' <any chars>
@@ -90,12 +91,15 @@ class URLPattern {
SCHEME_FILE = 1 << 2,
SCHEME_FTP = 1 << 3,
SCHEME_CHROMEUI = 1 << 4,
- SCHEME_FILESYSTEM = 1 << 5,
+ SCHEME_EXTENSION = 1 << 5,
+ SCHEME_FILESYSTEM = 1 << 6,
+
+ // IMPORTANT!
// SCHEME_ALL will match every scheme, including chrome://, chrome-
// extension://, about:, etc. Because this has lots of security
- // implications, third-party extensions should never be able to get access
- // to URL patterns initialized this way. It should only be used for internal
- // Chrome code.
+ // implications, third-party extensions should usually not be able to get
+ // access to URL patterns initialized this way. If there is a reason
+ // for violating this general rule, document why this it safe.
SCHEME_ALL = -1,
};
« no previous file with comments | « chrome/common/extensions/docs/webRequest.html ('k') | chrome/common/extensions/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698