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

Unified Diff: chrome/common/extensions/api/declarative_web_request.json

Issue 10449069: Support redirects by regular expression in declarative WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 6 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/api/declarative_web_request.json
diff --git a/chrome/common/extensions/api/declarative_web_request.json b/chrome/common/extensions/api/declarative_web_request.json
index 0ab322226d3023a9d283712f2371c996e589c70a..33fa8a8f0c41923e1afddbe06816777ac09c3a0f 100644
--- a/chrome/common/extensions/api/declarative_web_request.json
+++ b/chrome/common/extensions/api/declarative_web_request.json
@@ -66,6 +66,25 @@
}
},
{
+ "id": "declarativeWebRequest.RedirectByRegEx",
+ "description": "Redirects a request by applying a regular expression on the URL. The regular expressions use the <a href=\"http://code.google.com/p/re2/wiki/Syntax\">RE2 syntax</a>.",
+ "type": "object",
+ "properties": {
+ "instanceType": {
+ "type": "string", "enum": ["declarativeWebRequest.RedirectByRegEx"],
+ "nodoc": true
+ },
+ "from": {
+ "type": "string",
+ "description": "A match pattern that may contain capture groups. Capture groups are referenced in the Perl syntax ($1, $2, ...) instead of the RE2 syntax (\\1, \\2, ...) in order to be closer to JavaScript Regular Expressions."
+ },
+ "to": {
+ "type": "string",
+ "description": "Destination pattern."
+ }
+ }
+ },
+ {
"id": "declarativeWebRequest.SetRequestHeader",
"description": "Sets the request header of the specified name to the specified value. If a header with the specified name did not exist before, a new one is created. Header name comparison is always case-insensitive. Each request header name occurs only once in each request.",
"type": "object",
@@ -169,6 +188,7 @@
"declarativeWebRequest.RedirectRequest",
"declarativeWebRequest.RedirectToTransparentImage",
"declarativeWebRequest.RedirectToEmptyDocument",
+ "declarativeWebRequest.RedirectByRegEx",
"declarativeWebRequest.SetRequestHeader",
"declarativeWebRequest.RemoveRequestHeader",
"declarativeWebRequest.RemoveResponseHeader",

Powered by Google App Engine
This is Rietveld 408576698