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

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, 7 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..d6386895d548332f5c87ab99a22fc0d60557e05c 100644
--- a/chrome/common/extensions/api/declarative_web_request.json
+++ b/chrome/common/extensions/api/declarative_web_request.json
@@ -66,6 +66,30 @@
}
},
{
+ "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."
+ },
+ "to": {
+ "type": "string",
+ "description": "Destination pattern."
+ },
+ "perlCaptureGroupStyle": {
Matt Perry 2012/05/31 20:22:17 I don't think we should support this. We should ju
battre 2012/05/31 21:30:40 This will create a certain burden for HTTPS Everyw
Matt Perry 2012/05/31 21:38:56 I see... Maybe we should default to $ syntax, then
battre 2012/06/14 12:48:09 Done. I have followed your preference 1. I did no
+ "type": "boolean",
+ "description": "If set to true, capture groups are referenced in the perl syntax ($1, $2, ...) instead of the RE2 syntax (\\1, \\2, ...). Defaults to false.",
+ "optional": true
+ }
+ }
+ },
+ {
"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 +193,7 @@
"declarativeWebRequest.RedirectRequest",
"declarativeWebRequest.RedirectToTransparentImage",
"declarativeWebRequest.RedirectToEmptyDocument",
+ "declarativeWebRequest.RedirectByRegEx",
"declarativeWebRequest.SetRequestHeader",
"declarativeWebRequest.RemoveRequestHeader",
"declarativeWebRequest.RemoveResponseHeader",

Powered by Google App Engine
This is Rietveld 408576698