Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "description_permissions_required": ["declarative", "declarativeWebRequest"] , |
|
battre
2012/08/23 12:32:11
I think this change is wrong.
vabr (Chromium)
2012/08/24 14:48:59
Sorry, that was unintentional. Wrongly written sub
| |
| 9 "types": [ | 9 "types": [ |
| 10 { | 10 { |
| 11 "id": "HeaderFilter", | |
| 12 "type": "object", | |
| 13 "description": "Filters request headers for various criteria.", | |
| 14 "properties": { | |
| 15 "namePrefix": { | |
| 16 "description" : "Matches if the header name starts with a specified string.", | |
|
battre
2012/08/23 12:32:11
This does not cover the array.
vabr (Chromium)
2012/08/24 14:48:59
I amended the comments, and also removed the choic
| |
| 17 "choices": [ | |
| 18 {"type": "array", "items": {"type": "string"}}, | |
| 19 {"type": "string"} | |
| 20 ], | |
| 21 "optional": true | |
| 22 }, | |
| 23 "nameSuffix": { | |
| 24 "choices": [ | |
| 25 {"type": "array", "items": {"type": "string"}}, | |
| 26 {"type": "string"} | |
| 27 ], | |
| 28 "optional": true, | |
| 29 "description" : "Matches if the header name ends with a specified st ring." | |
| 30 }, | |
| 31 "nameContains": { | |
| 32 "choices": [ | |
| 33 {"type": "array", "items": {"type": "string"}}, | |
| 34 {"type": "string"} | |
| 35 ], | |
| 36 "optional": true, | |
| 37 "description" : "Matches if the header name contains a specified str ing." | |
| 38 }, | |
| 39 "nameEquals": { | |
| 40 "choices": [ | |
| 41 {"type": "array", "items": {"type": "string"}}, | |
| 42 {"type": "string"} | |
| 43 ], | |
| 44 "optional": true, | |
| 45 "description" : "Matches if the header name is equal to a specified string." | |
| 46 }, | |
| 47 "valuePrefix": { | |
| 48 "choices": [ | |
| 49 {"type": "array", "items": {"type": "string"}}, | |
| 50 {"type": "string"} | |
| 51 ], | |
| 52 "optional": true, | |
| 53 "description" : "Matches if the header value starts with a specified string." | |
| 54 }, | |
| 55 "valueSuffix": { | |
| 56 "choices": [ | |
| 57 {"type": "array", "items": {"type": "string"}}, | |
| 58 {"type": "string"} | |
| 59 ], | |
| 60 "optional": true, | |
| 61 "description" : "Matches if the header value ends with a specified s tring." | |
| 62 }, | |
| 63 "valueContains": { | |
| 64 "choices": [ | |
| 65 {"type": "array", "items": {"type": "string"}}, | |
| 66 {"type": "string"} | |
| 67 ], | |
| 68 "optional": true, | |
| 69 "description" : "Matches if the header value contains a specified st ring." | |
| 70 }, | |
| 71 "valueEquals": { | |
| 72 "choices": [ | |
| 73 {"type": "array", "items": {"type": "string"}}, | |
| 74 {"type": "string"} | |
| 75 ], | |
| 76 "optional": true, | |
| 77 "description" : "Matches if the header value is equal to a specified string." | |
| 78 } | |
| 79 } | |
| 80 }, | |
| 81 { | |
| 11 "id": "RequestMatcher", | 82 "id": "RequestMatcher", |
| 12 "type": "object", | 83 "type": "object", |
| 13 "description": "Matches network events by various criteria.", | 84 "description": "Matches network events by various criteria.", |
| 14 "properties": { | 85 "properties": { |
| 15 "url": { | 86 "url": { |
| 16 "$ref": "events.UrlFilter", | 87 "$ref": "events.UrlFilter", |
| 17 "description": "Matches if the condition of the UrlFilter are fulfil led for the URL of the request.", | 88 "description": "Matches if the condition of the UrlFilter are fulfil led for the URL of the request.", |
| 18 "optional": true | 89 "optional": true |
| 19 }, | 90 }, |
| 20 "resourceType": { | 91 "resourceType": { |
| 21 "type": "array", | 92 "type": "array", |
| 22 "optional": true, | 93 "optional": true, |
| 23 "description": "Matches if the request type of a request is containe d in the list. Requests that cannot match any of the types will be filtered out. ", | 94 "description": "Matches if the request type of a request is containe d in the list. Requests that cannot match any of the types will be filtered out. ", |
| 24 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"] } | 95 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"] } |
| 25 }, | 96 }, |
| 26 "contentType": { | 97 "contentType": { |
| 27 "type": "array", | 98 "type": "array", |
| 28 "optional": true, | 99 "optional": true, |
| 29 "description": "Matches if the MIME media type of a response (from t he HTTP Content-Type header) is contained in the list.", | 100 "description": "Matches if the MIME media type of a response (from t he HTTP Content-Type header) is contained in the list.", |
| 30 "items": { "type": "string" } | 101 "items": { "type": "string" } |
| 31 }, | 102 }, |
| 32 "excludeContentType": { | 103 "excludeContentType": { |
| 33 "type": "array", | 104 "type": "array", |
| 34 "optional": true, | 105 "optional": true, |
| 35 "description": "Matches if the MIME media type of a response (from t he HTTP Content-Type header) is <em>not</em> contained in the list.", | 106 "description": "Matches if the MIME media type of a response (from t he HTTP Content-Type header) is <em>not</em> contained in the list.", |
| 36 "items": { "type": "string" } | 107 "items": { "type": "string" } |
| 37 }, | 108 }, |
| 109 "containsHeaders": { | |
|
battre
2012/08/23 12:32:11
I would rename this to "responseHeaders"
vabr (Chromium)
2012/08/24 14:48:59
Done.
| |
| 110 "type": "array", | |
| 111 "optional": true, | |
| 112 "description": "Matches if some of the headers is matched by one of the HeaderFilters.", | |
|
battre
2012/08/23 12:32:11
response headers
vabr (Chromium)
2012/08/24 14:48:59
Done.
| |
| 113 "items": { "$ref": "HeaderFilter" } | |
| 114 }, | |
| 115 "doesNotContainHeaders": { | |
|
battre
2012/08/23 12:32:11
I would rename this to "excludeResponseHeaders"
vabr (Chromium)
2012/08/24 14:48:59
Done.
| |
| 116 "type": "array", | |
| 117 "optional": true, | |
| 118 "description": "Matches if none of the headers is matched by one of the HeaderFilters.", | |
|
battre
2012/08/23 12:32:11
response headers
vabr (Chromium)
2012/08/24 14:48:59
Done.
| |
| 119 "items": { "$ref": "HeaderFilter" } | |
| 120 }, | |
| 38 "instanceType": { | 121 "instanceType": { |
| 39 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], | 122 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], |
| 40 "nodoc": true | 123 "nodoc": true |
| 41 } | 124 } |
| 42 } | 125 } |
| 43 }, | 126 }, |
| 44 { | 127 { |
| 45 "id": "CancelRequest", | 128 "id": "CancelRequest", |
| 46 "description": "Declarative event action that cancels a network request. ", | 129 "description": "Declarative event action that cancels a network request. ", |
| 47 "type": "object", | 130 "type": "object", |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 "declarativeWebRequest.RemoveRequestHeader", | 464 "declarativeWebRequest.RemoveRequestHeader", |
| 382 "declarativeWebRequest.RemoveResponseHeader", | 465 "declarativeWebRequest.RemoveResponseHeader", |
| 383 "declarativeWebRequest.SetRequestHeader", | 466 "declarativeWebRequest.SetRequestHeader", |
| 384 "declarativeWebRequest.IgnoreRules" | 467 "declarativeWebRequest.IgnoreRules" |
| 385 ] | 468 ] |
| 386 } | 469 } |
| 387 } | 470 } |
| 388 ] | 471 ] |
| 389 } | 472 } |
| 390 ] | 473 ] |
| OLD | NEW |