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

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

Issue 12792005: Allow extensions on chrome:// URLs, when flag is set and permission is explicitly requested (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reinstate original pickle order; add scripts clause to content_script_chrome_url_invalid.json to av… Created 7 years, 9 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
Index: chrome/common/extensions/user_script.h
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index 49632e5e8f3e8b6890d96efb1050910d11785f04..00b0d3944fbc95679f1f49211df6b496cb06c236 100644
--- a/chrome/common/extensions/user_script.h
+++ b/chrome/common/extensions/user_script.h
@@ -26,18 +26,14 @@ class UserScript {
// The file extension for standalone user scripts.
static const char kFileExtension[];
- // The bitmask for valid user script injectable schemes used by URLPattern.
- enum {
- kValidUserScriptSchemes = URLPattern::SCHEME_HTTP |
- URLPattern::SCHEME_HTTPS |
- URLPattern::SCHEME_FILE |
- URLPattern::SCHEME_FTP
- };
-
// Check if a URL should be treated as a user script and converted to an
// extension.
static bool IsURLUserScript(const GURL& url, const std::string& mime_type);
+ // Get the valid user script schemes for the current process. If
+ // canExecuteScriptEverywhere is true, this will return ALL_SCHEMES.
+ static int ValidUserScriptSchemes(bool canExecuteScriptEverywhere = false);
+
// Locations that user scripts can be run inside the document.
enum RunLocation {
UNDEFINED,

Powered by Google App Engine
This is Rietveld 408576698