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

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

Issue 10874029: Adding condition attributes for response headers to Declarative WebRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 3a8f715f512a3589a1d14bf1dde4234453ca180c..5d5943b24aa29ef79b69e1a4adc83b5791ec18f4 100644
--- a/chrome/common/extensions/api/declarative_web_request.json
+++ b/chrome/common/extensions/api/declarative_web_request.json
@@ -8,6 +8,59 @@
"documentation_permissions_required": ["declarative", "declarativeWebRequest"],
"types": [
{
+ "id": "HeaderFilter",
+ "type": "object",
+ "description": "Filters request headers for various criteria.",
+ "properties": {
+ "namePrefix": {
+ "description" : "Matches if the header name starts with the specified string.",
+ "type": "string",
+ "optional": true
+ },
+ "nameSuffix": {
+ "type": "string",
+ "optional": true,
+ "description" : "Matches if the header name ends with the specified string."
+ },
+ "nameContains": {
+ "choices": [
+ {"type": "array", "items": {"type": "string"}},
+ {"type": "string"}
+ ],
+ "optional": true,
+ "description" : "Matches if the header name contains all of the specified strings."
+ },
+ "nameEquals": {
+ "type": "string",
+ "optional": true,
+ "description" : "Matches if the header name is equal to the specified string."
+ },
+ "valuePrefix": {
+ "type": "string",
+ "optional": true,
+ "description" : "Matches if the header value starts with the specified string."
+ },
+ "valueSuffix": {
+ "type": "string",
+ "optional": true,
+ "description" : "Matches if the header value ends with the specified string."
+ },
+ "valueContains": {
+ "choices": [
+ {"type": "array", "items": {"type": "string"}},
+ {"type": "string"}
+ ],
+ "optional": true,
+ "description" : "Matches if the header value contains all of the specified strings."
+ },
+ "valueEquals": {
+ "type": "string",
+ "optional": true,
+ "description" : "Matches if the header value is equal to the specified string."
+ }
+ }
+ },
+ {
"id": "RequestMatcher",
"type": "object",
"description": "Matches network events by various criteria.",
@@ -35,6 +88,18 @@
"description": "Matches if the MIME media type of a response (from the HTTP Content-Type header) is <em>not</em> contained in the list.",
"items": { "type": "string" }
},
+ "responseHeaders": {
+ "type": "array",
+ "optional": true,
+ "description": "Matches if some of the response headers is matched by one of the HeaderFilters.",
+ "items": { "$ref": "HeaderFilter" }
+ },
+ "excludeResponseHeaders": {
+ "type": "array",
+ "optional": true,
+ "description": "Matches if none of the response headers is matched by one of the HeaderFilters.",
+ "items": { "$ref": "HeaderFilter" }
+ },
"instanceType": {
"type": "string", "enum": ["declarativeWebRequest.RequestMatcher"],
"nodoc": true

Powered by Google App Engine
This is Rietveld 408576698