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

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)

Created:
3 years, 10 months ago by mmenke
Modified:
3 years, 9 months ago
CC:
chromium-reviews, asanka, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, Randy Smith (Not in Mondays), yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, loading-reviews_chromium.org, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ResourceHandler::OnWillRead able to complete asynchronously. This will let us simplify the Mojo code a bit in the future, and it makes it consistent with all other ResourceHandler methods, which always use ResourceController for resuming and cancellation, rather than returning a bool. No ResourceHandler currently takes advantage of this behavior, though this CL updates all intermediary ResourceHandlers to support it. BUG=687240 Review-Url: https://codereview.chromium.org/2668603003 Cr-Commit-Position: refs/heads/master@{#455759} Committed: https://chromium.googlesource.com/chromium/src/+/3c1d10caa48428f7a185458ae7e9f70211d7c9fd

Patch Set 1 #

Patch Set 2 : Add tests #

Patch Set 3 : Bleh #

Patch Set 4 : ... #

Patch Set 5 : Tests! #

Patch Set 6 : de-clang #

Patch Set 7 : Fix #

Patch Set 8 : Rename methods #

Patch Set 9 : One bot doesn't like 256 day timers. :( #

Total comments: 26

Patch Set 10 : Response to comments #

Patch Set 11 : merge #

Patch Set 12 : Base off of trunk #

Patch Set 13 : Fix merge (x2) #

Total comments: 10

Patch Set 14 : Response to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1149 lines, -336 lines) Patch
M content/browser/download/download_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 chunk +10 lines, -3 lines 0 comments Download
M content/browser/download/save_file_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/download/save_file_resource_handler.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/loader/async_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/async_resource_handler.cc View 2 chunks +17 lines, -10 lines 0 comments Download
M content/browser/loader/detachable_resource_handler.h View 1 2 3 4 5 chunks +12 lines, -3 lines 0 comments Download
M content/browser/loader/detachable_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +37 lines, -5 lines 0 comments Download
A content/browser/loader/detachable_resource_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +354 lines, -0 lines 0 comments Download
M content/browser/loader/intercepting_resource_handler.h View 1 2 3 4 5 6 5 chunks +37 lines, -9 lines 0 comments Download
M content/browser/loader/intercepting_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +126 lines, -44 lines 0 comments Download
M content/browser/loader/intercepting_resource_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 8 chunks +71 lines, -23 lines 0 comments Download
M content/browser/loader/layered_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/layered_resource_handler.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/loader/mime_sniffing_resource_handler.h View 4 chunks +19 lines, -2 lines 0 comments Download
M content/browser/loader/mime_sniffing_resource_handler.cc View 5 chunks +63 lines, -13 lines 0 comments Download
M content/browser/loader/mime_sniffing_resource_handler_unittest.cc View 1 6 7 8 9 9 chunks +94 lines, -94 lines 0 comments Download
M content/browser/loader/mock_resource_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/loader/mock_resource_loader.cc View 4 chunks +29 lines, -17 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +19 lines, -11 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/loader/navigation_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_resource_handler.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/loader/redirect_to_file_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/redirect_to_file_resource_handler.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/loader/resource_handler.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -6 lines 0 comments Download
M content/browser/loader/resource_loader.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -2 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +38 lines, -23 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 2 3 4 15 chunks +87 lines, -14 lines 0 comments Download
M content/browser/loader/stream_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/stream_resource_handler.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/loader/sync_resource_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/sync_resource_handler.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/loader/test_resource_handler.h View 1 2 3 4 6 chunks +15 lines, -4 lines 0 comments Download
M content/browser/loader/test_resource_handler.cc View 1 2 3 4 5 chunks +39 lines, -10 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 67 (53 generated)
mmenke
csharrison: As I said on the other CL, if you don't get to reviewing this ...
3 years, 10 months ago (2017-02-01 21:13:17 UTC) #23
Charlie Harrison
It will likely take me a while to get this done with conferences, etc. this ...
3 years, 10 months ago (2017-02-01 23:32:12 UTC) #29
mmenke
On 2017/02/01 23:32:12, Charlie Harrison-slow til Feb3 wrote: > It will likely take me a ...
3 years, 10 months ago (2017-02-01 23:34:44 UTC) #30
Charlie Harrison
Generally looks good, first round of comments. https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/async_resource_handler.cc File content/browser/loader/async_resource_handler.cc (right): https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/async_resource_handler.cc#newcode377 content/browser/loader/async_resource_handler.cc:377: controller->CancelWithError(net::ERR_INSUFFICIENT_RESOURCES); w00t! ...
3 years, 10 months ago (2017-02-16 21:25:05 UTC) #33
mmenke
[+rdsmith]: Please review content/browser/download https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/detachable_resource_handler_unittest.cc File content/browser/loader/detachable_resource_handler_unittest.cc (right): https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/detachable_resource_handler_unittest.cc#newcode79 content/browser/loader/detachable_resource_handler_unittest.cc:79: // TODO(mmenke): This file currently ...
3 years, 9 months ago (2017-03-08 19:16:07 UTC) #45
Charlie Harrison
Just a few minor comments. LGTM https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/detachable_resource_handler_unittest.cc File content/browser/loader/detachable_resource_handler_unittest.cc (right): https://codereview.chromium.org/2668603003/diff/200001/content/browser/loader/detachable_resource_handler_unittest.cc#newcode79 content/browser/loader/detachable_resource_handler_unittest.cc:79: // TODO(mmenke): This ...
3 years, 9 months ago (2017-03-08 21:12:46 UTC) #48
Randy Smith (Not in Mondays)
content/browser/download LGTM.
3 years, 9 months ago (2017-03-08 21:43:16 UTC) #49
mmenke
Thanks for the reviews! https://codereview.chromium.org/2668603003/diff/300001/content/browser/loader/detachable_resource_handler.cc File content/browser/loader/detachable_resource_handler.cc (right): https://codereview.chromium.org/2668603003/diff/300001/content/browser/loader/detachable_resource_handler.cc#newcode82 content/browser/loader/detachable_resource_handler.cc:82: parent_read_buffer_size_(0), On 2017/03/08 21:12:46, Charlie ...
3 years, 9 months ago (2017-03-08 22:51:30 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2668603003/320001
3 years, 9 months ago (2017-03-09 15:54:23 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/381974)
3 years, 9 months ago (2017-03-09 16:02:47 UTC) #59
mmenke
[+asanka]: Please review content/browser/download (Oops, thought rdsmith was an owner!)
3 years, 9 months ago (2017-03-09 16:08:44 UTC) #61
asanka
lgtm
3 years, 9 months ago (2017-03-09 16:13:24 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2668603003/320001
3 years, 9 months ago (2017-03-09 16:19:14 UTC) #64
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 16:26:31 UTC) #67
Message was sent while issue was closed.
Committed patchset #14 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/3c1d10caa48428f7a185458ae7e9...

Powered by Google App Engine
This is Rietveld 408576698