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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "declarativeWebRequest", 7 "namespace": "declarativeWebRequest",
8 "documentation_permissions_required": ["declarative", "declarativeWebRequest "], 8 "documentation_permissions_required": ["declarative", "declarativeWebRequest "],
9 "types": [ 9 "types": [
10 { 10 {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 "description": "Declarative event action that redirects a network reques t to an empty document.", 59 "description": "Declarative event action that redirects a network reques t to an empty document.",
60 "type": "object", 60 "type": "object",
61 "properties": { 61 "properties": {
62 "instanceType": { 62 "instanceType": {
63 "type": "string", "enum": ["declarativeWebRequest.RedirectToEmptyDoc ument"], 63 "type": "string", "enum": ["declarativeWebRequest.RedirectToEmptyDoc ument"],
64 "nodoc": true 64 "nodoc": true
65 } 65 }
66 } 66 }
67 }, 67 },
68 { 68 {
69 "id": "declarativeWebRequest.RedirectByRegEx",
70 "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>.",
71 "type": "object",
72 "properties": {
73 "instanceType": {
74 "type": "string", "enum": ["declarativeWebRequest.RedirectByRegEx"],
75 "nodoc": true
76 },
77 "from": {
78 "type": "string",
79 "description": "A match pattern that may contain capture groups."
80 },
81 "to": {
82 "type": "string",
83 "description": "Destination pattern."
84 },
85 "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
86 "type": "boolean",
87 "description": "If set to true, capture groups are referenced in the perl syntax ($1, $2, ...) instead of the RE2 syntax (\\1, \\2, ...). Defaults t o false.",
88 "optional": true
89 }
90 }
91 },
92 {
69 "id": "declarativeWebRequest.SetRequestHeader", 93 "id": "declarativeWebRequest.SetRequestHeader",
70 "description": "Sets the request header of the specified name to the spe cified value. If a header with the specified name did not exist before, a new on e is created. Header name comparison is always case-insensitive. Each request he ader name occurs only once in each request.", 94 "description": "Sets the request header of the specified name to the spe cified value. If a header with the specified name did not exist before, a new on e is created. Header name comparison is always case-insensitive. Each request he ader name occurs only once in each request.",
71 "type": "object", 95 "type": "object",
72 "properties": { 96 "properties": {
73 "instanceType": { 97 "instanceType": {
74 "type": "string", "enum": ["declarativeWebRequest.SetRequestHeader"] , 98 "type": "string", "enum": ["declarativeWebRequest.SetRequestHeader"] ,
75 "nodoc": true 99 "nodoc": true
76 }, 100 },
77 "name": { 101 "name": {
78 "type": "string", 102 "type": "string",
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 "options": { 186 "options": {
163 "supportsListeners": false, 187 "supportsListeners": false,
164 "supportsRules": true, 188 "supportsRules": true,
165 "conditions": ["declarativeWebRequest.RequestMatcher"], 189 "conditions": ["declarativeWebRequest.RequestMatcher"],
166 "actions": [ 190 "actions": [
167 "declarativeWebRequest.AddResponseHeader", 191 "declarativeWebRequest.AddResponseHeader",
168 "declarativeWebRequest.CancelRequest", 192 "declarativeWebRequest.CancelRequest",
169 "declarativeWebRequest.RedirectRequest", 193 "declarativeWebRequest.RedirectRequest",
170 "declarativeWebRequest.RedirectToTransparentImage", 194 "declarativeWebRequest.RedirectToTransparentImage",
171 "declarativeWebRequest.RedirectToEmptyDocument", 195 "declarativeWebRequest.RedirectToEmptyDocument",
196 "declarativeWebRequest.RedirectByRegEx",
172 "declarativeWebRequest.SetRequestHeader", 197 "declarativeWebRequest.SetRequestHeader",
173 "declarativeWebRequest.RemoveRequestHeader", 198 "declarativeWebRequest.RemoveRequestHeader",
174 "declarativeWebRequest.RemoveResponseHeader", 199 "declarativeWebRequest.RemoveResponseHeader",
175 "declarativeWebRequest.IgnoreRules" 200 "declarativeWebRequest.IgnoreRules"
176 ] 201 ]
177 } 202 }
178 } 203 }
179 ] 204 ]
180 } 205 }
181 ] 206 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698