|
Add defer out params to ResourceHandler's OnResponseStarted
and OnReadCompleted methods. Use that to pause the request
instead of directly calling ResourceDispatcherHostImpl's
PauseRequest function.
Eliminate direct calls to PauseRequest, with the exception of
resource_dispatcher_host_unittest.cc and some uses internal to
ResourceDispatcherHostImpl. Those should ultimately be
changed to use the defer out-param approach too.
This CL also changes the DownloadRequestHandle to talk back to
the DownloadResourceHandler in order to pause / resume / cancel
the URLRequest. The handle keeps a reference to the handler,
which may extend the lifetime of the handler, but that should be
OK given that the handler already supports having its lifetime
extended beyond the URLRequest.
Now, instead of the DownloadFileManager calling PauseRequest, we
just wait for the SetDownloadID call to resume the URLRequest.
This simplifies some of the logic. The Pause/ResumeRequest
issued on a DownloadRequestHandle gets its own pause counter,
which has nothing to do with the internal pausing that the
DownloadResourceHandler does when it is waiting for a DownloadId.
See DownloadResourceHandler::MaybeResumeRequest for the logic
that handles the conditions for resuming the URLRequest.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138111
Total comments: 4
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+408 lines, -282 lines) |
Patch |
 |
M |
content/browser/download/download_file_manager.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/download_request_handle.h
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/download/download_request_handle.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+12 lines, -39 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/download_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+22 lines, -14 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/download_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
10 chunks |
+110 lines, -48 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/save_file_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/save_file_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/async_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/async_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/buffered_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/buffered_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
12 chunks |
+54 lines, -53 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/cross_site_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/cross_site_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
7 chunks |
+30 lines, -20 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/doomed_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/doomed_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/layered_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/layered_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/redirect_to_file_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/redirect_to_file_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+16 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/resource_dispatcher_host_impl.h
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/resource_dispatcher_host_impl.cc
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+54 lines, -35 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/resource_dispatcher_host_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/sync_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/sync_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/throttling_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/throttling_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/x509_user_cert_resource_handler.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/x509_user_cert_resource_handler.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
Total messages: 7 (0 generated)
|