diff options
author | rob <rob@robwu.nl> | 2015-12-22 11:46:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-22 19:47:40 +0000 |
commit | 6a32a203bbae04ef29a42f3f364ec00a0adf9179 (patch) | |
tree | bd050d81bf3272834e71766e7aa1b55fda9507b9 /extensions/common | |
parent | 6abb1cd695aeb366d9a9a4e4e6dbbe3e94902ab1 (diff) | |
download | chromium_src-6a32a203bbae04ef29a42f3f364ec00a0adf9179.zip chromium_src-6a32a203bbae04ef29a42f3f364ec00a0adf9179.tar.gz chromium_src-6a32a203bbae04ef29a42f3f364ec00a0adf9179.tar.bz2 |
WebRequest API: add more resource types
Added new resource types "font" and "ping" to identify fonts, <a ping>
and navigator.sendBeacon requests. Existing types are also extended:
Workers (web workers, shared workers, service workers) are mapped to
"script" and favicons are mapped to "image". Plugin requests are also
labeled as "object".
(all of these mentioned requests were previously labeled as "other").
Added two resource types:
- RESOURCE_TYPE_CSP_REPORT; Previously RequestContextCSPReport mapped to
RESOURCE_TYPE_PING. ping and beacons are commonly used for tracking,
whereas CSP reports aid the security of website owners. By not
including CSP reports in the ping type, extensions that disable ping
will not inadvertently block security features of a website.
- RESOURCE_TYPE_PLUGIN_RESOURCE; plugin requests should be tagged as
"object" instead of "other". But we cannot use RESOURCE_TYPE_OBJECT
because this is used by MimeTypeResourceHandler::SelectNextHandler to
determine whether to intercept the resource and display the result in
a plugin.
BUG=80230,410382,512406
TEST=ExtensionWebRequestApiTest.*
Review URL: https://codereview.chromium.org/1515703005
Cr-Commit-Position: refs/heads/master@{#366632}
Diffstat (limited to 'extensions/common')
-rw-r--r-- | extensions/common/api/declarative_web_request.json | 2 | ||||
-rw-r--r-- | extensions/common/api/web_request.json | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/extensions/common/api/declarative_web_request.json b/extensions/common/api/declarative_web_request.json index e9ea8a2..bfb7082 100644 --- a/extensions/common/api/declarative_web_request.json +++ b/extensions/common/api/declarative_web_request.json @@ -79,7 +79,7 @@ "type": "array", "optional": true, "description": "Matches if the request type of a request is contained in the list. Requests that cannot match any of the types will be filtered out.", - "items": { "type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"] } + "items": { "type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "other"] } }, "contentType": { "type": "array", diff --git a/extensions/common/api/web_request.json b/extensions/common/api/web_request.json index f76e941..4e314eb 100644 --- a/extensions/common/api/web_request.json +++ b/extensions/common/api/web_request.json @@ -16,7 +16,7 @@ { "id": "ResourceType", "type": "string", - "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"] + "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "other"] }, { "id": "OnBeforeRequestOptions", |