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

Issue 1515703005: WebRequest API: add more resource types (Closed)

Created:
5 years ago by robwu
Modified:
5 years ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, extensions-reviews_chromium.org, grt+watch_chromium.org, jam, loading-reviews_chromium.org, Nathan Parker
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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.* Committed: https://crrev.com/6a32a203bbae04ef29a42f3f364ec00a0adf9179 Cr-Commit-Position: refs/heads/master@{#366632}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Address review comments (creis, mattm, battre) #

Total comments: 4

Patch Set 3 : Update comment, move logical negation #

Total comments: 3

Patch Set 4 : Split histogram values #

Patch Set 5 : Rename histogram by appending '2'. #

Patch Set 6 : Rename histograms in the proper way #

Patch Set 7 : run pretty_print.py #

Patch Set 8 : Replace == with && 2x #

Unified diffs Side-by-side diffs Delta from patch set Stats (+770 lines, -43 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_apitest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_throttle.cc View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc View 1 2 3 4 5 4 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/remote_database_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/webrequest/framework.js View 1 2 3 4 5 6 7 3 chunks +31 lines, -3 lines 0 comments Download
A + chrome/test/data/extensions/api_test/webrequest/test_types.html View 1 chunk +2 lines, -3 lines 0 comments Download
A chrome/test/data/extensions/api_test/webrequest/test_types.js View 1 chunk +411 lines, -0 lines 0 comments Download
M content/browser/loader/mime_type_resource_handler_unittest.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/child/site_isolation_stats_gatherer.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/child/site_isolation_stats_gatherer.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/child/site_isolation_stats_gatherer_browsertest.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M content/child/web_url_request_util.cc View 1 3 chunks +8 lines, -2 lines 0 comments Download
M content/public/common/resource_type.h View 1 4 2 chunks +5 lines, -3 lines 0 comments Download
M extensions/browser/api/web_request/web_request_api_helpers.cc View 3 chunks +14 lines, -9 lines 0 comments Download
M extensions/common/api/declarative_web_request.json View 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/api/web_request.json View 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 30 chunks +258 lines, -0 lines 0 comments Download

Messages

Total messages: 70 (31 generated)
robwu
Hi all, please review. Dominic: *web_request* = most of the significant changes. mattm: chrome/browser/safe_browsing/* stamp ...
5 years ago (2015-12-12 16:34:17 UTC) #9
Charlie Reis
content/ seems reasonable to me, with nits. Happy to rubber stamp once battre@ has approved. ...
5 years ago (2015-12-14 20:53:23 UTC) #10
mattm
+nparker fyi safe_browsing lgtm https://codereview.chromium.org/1515703005/diff/140001/content/public/common/resource_type.h File content/public/common/resource_type.h (right): https://codereview.chromium.org/1515703005/diff/140001/content/public/common/resource_type.h#newcode32 content/public/common/resource_type.h:32: RESOURCE_TYPE_PLUGIN_RESOURCE = 17, // a ...
5 years ago (2015-12-15 00:40:37 UTC) #11
battre
web_request stuff LGTM. Jochen, are you ok with adding additional resource types? Asking you because ...
5 years ago (2015-12-15 12:53:09 UTC) #13
robwu
https://codereview.chromium.org/1515703005/diff/140001/chrome/test/data/extensions/api_test/webrequest/framework.js File chrome/test/data/extensions/api_test/webrequest/framework.js (right): https://codereview.chromium.org/1515703005/diff/140001/chrome/test/data/extensions/api_test/webrequest/framework.js#newcode175 chrome/test/data/extensions/api_test/webrequest/framework.js:175: function isUnexpectedDetachedRequest(name, details) { On 2015/12/15 12:53:09, battre wrote: ...
5 years ago (2015-12-15 13:17:25 UTC) #14
battre
Actually, I am still struggling with some of the logic. https://codereview.chromium.org/1515703005/diff/160001/chrome/test/data/extensions/api_test/webrequest/framework.js File chrome/test/data/extensions/api_test/webrequest/framework.js (right): https://codereview.chromium.org/1515703005/diff/160001/chrome/test/data/extensions/api_test/webrequest/framework.js#newcode176 ...
5 years ago (2015-12-15 13:32:55 UTC) #15
robwu
https://codereview.chromium.org/1515703005/diff/160001/chrome/test/data/extensions/api_test/webrequest/framework.js File chrome/test/data/extensions/api_test/webrequest/framework.js (right): https://codereview.chromium.org/1515703005/diff/160001/chrome/test/data/extensions/api_test/webrequest/framework.js#newcode176 chrome/test/data/extensions/api_test/webrequest/framework.js:176: if (details.tabId !== -1 || details.frameId >= 0) On ...
5 years ago (2015-12-15 14:13:31 UTC) #17
battre
great, thank you!
5 years ago (2015-12-15 14:42:49 UTC) #18
Marijn Kruisselbrink
extensions/ LGTM
5 years ago (2015-12-15 18:15:50 UTC) #19
Charlie Reis
On 2015/12/15 12:53:09, battre wrote: > web_request stuff LGTM. > > Jochen, are you ok ...
5 years ago (2015-12-15 19:14:06 UTC) #22
jochen (gone - plz use gerrit)
I'm fine with adding more types.
5 years ago (2015-12-16 09:03:01 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515703005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515703005/200001
5 years ago (2015-12-16 09:03:42 UTC) #26
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No L-G-T-M from ...
5 years ago (2015-12-16 09:03:45 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515703005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515703005/200001
5 years ago (2015-12-16 09:09:04 UTC) #31
jochen (gone - plz use gerrit)
lgtm
5 years ago (2015-12-16 09:10:51 UTC) #32
robwu
+mpearson Could you rubberstamp the changes to histograms.xml?
5 years ago (2015-12-16 09:15:53 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/129453)
5 years ago (2015-12-16 09:17:56 UTC) #36
Mark P
https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h File content/public/common/resource_type.h (right): https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h#newcode33 content/public/common/resource_type.h:33: RESOURCE_TYPE_PLUGIN_RESOURCE = 17, // a resource that a plugin ...
5 years ago (2015-12-16 21:00:36 UTC) #37
robwu
https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h File content/public/common/resource_type.h (right): https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h#newcode33 content/public/common/resource_type.h:33: RESOURCE_TYPE_PLUGIN_RESOURCE = 17, // a resource that a plugin ...
5 years ago (2015-12-16 21:17:03 UTC) #38
Mark P
https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h File content/public/common/resource_type.h (right): https://codereview.chromium.org/1515703005/diff/200001/content/public/common/resource_type.h#newcode33 content/public/common/resource_type.h:33: RESOURCE_TYPE_PLUGIN_RESOURCE = 17, // a resource that a plugin ...
5 years ago (2015-12-16 22:43:36 UTC) #39
robwu
Mark - please take a look at my histogram changes. Is it OK?
5 years ago (2015-12-18 09:35:54 UTC) #40
Mark P
On Fri, Dec 18, 2015 at 1:35 AM, <rob@robwu.nl> wrote: > Mark - please take ...
5 years ago (2015-12-18 18:28:35 UTC) #41
robwu
On 2015/12/18 18:28:35, Mark P wrote: > On Fri, Dec 18, 2015 at 1:35 AM, ...
5 years ago (2015-12-18 18:33:57 UTC) #42
robwu
On 2015/12/18 18:33:57, robwu wrote: > On 2015/12/18 18:28:35, Mark P wrote: > > On ...
5 years ago (2015-12-18 18:36:50 UTC) #43
Mark P
On Fri, Dec 18, 2015 at 10:33 AM, <rob@robwu.nl> wrote: > On 2015/12/18 18:28:35, Mark ...
5 years ago (2015-12-18 20:31:26 UTC) #44
robwu
On 2015/12/18 20:31:26, Mark P wrote: > On Fri, Dec 18, 2015 at 10:33 AM, ...
5 years ago (2015-12-18 20:55:11 UTC) #45
Marijn Kruisselbrink
On 2015/12/18 at 20:55:11, rob wrote: > On 2015/12/18 20:31:26, Mark P wrote: > > ...
5 years ago (2015-12-18 21:20:38 UTC) #46
Mark P
On Fri, Dec 18, 2015 at 1:20 PM, <mek@chromium.org> wrote: > On 2015/12/18 at 20:55:11, ...
5 years ago (2015-12-18 22:43:00 UTC) #47
robwu
On 2015/12/18 22:43:00, Mark P wrote: > On Fri, Dec 18, 2015 at 1:20 PM, ...
5 years ago (2015-12-18 22:52:19 UTC) #48
Mark P
On 2015/12/18 22:52:19, robwu wrote: > On 2015/12/18 22:43:00, Mark P wrote: > > On ...
5 years ago (2015-12-18 22:55:18 UTC) #49
robwu
On 2015/12/18 22:55:18, Mark P wrote: > You did not rename the histogram in the ...
5 years ago (2015-12-19 00:06:36 UTC) #50
Mark P
histograms lgtm Nice work on fixing up the histograms as I asked. It's clear you ...
5 years ago (2015-12-22 06:18:57 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515703005/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515703005/260001
5 years ago (2015-12-22 10:42:35 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/131140)
5 years ago (2015-12-22 10:49:57 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515703005/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515703005/280001
5 years ago (2015-12-22 11:12:08 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/158516)
5 years ago (2015-12-22 11:56:56 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515703005/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515703005/340001
5 years ago (2015-12-22 18:20:29 UTC) #66
commit-bot: I haz the power
Committed patchset #8 (id:340001)
5 years ago (2015-12-22 19:47:00 UTC) #68
commit-bot: I haz the power
5 years ago (2015-12-22 19:47:50 UTC) #70
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6a32a203bbae04ef29a42f3f364ec00a0adf9179
Cr-Commit-Position: refs/heads/master@{#366632}

Powered by Google App Engine
This is Rietveld 408576698