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

Issue 10392111: Use ByteStream in downloads system to decouple source and sink. (Closed)

Created:
8 years, 7 months ago by Randy Smith (Not in Mondays)
Modified:
8 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, joi+watch-content_chromium.org, rginda+watch_chromium.org, eroman, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, mmenke, achuithb, mattm, satorux1, darin (slow to review)
Visibility:
Public.

Description

Use ByteStream in downloads system to decouple source and sink. BUG=123192 BUG=93006 BUG=111588 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140328

Patch Set 1 #

Patch Set 2 : Various cleanups. #

Patch Set 3 : Results of self code review. #

Total comments: 13

Patch Set 4 : Added some histogram statistics. #

Total comments: 4

Patch Set 5 : Rebase to LKGR, including new ResourceHandler pausing logic. #

Patch Set 6 : Incorporated comments and cleaned up callback logic. #

Patch Set 7 : A bit more cleanup in DownloadResourceHandler. #

Patch Set 8 : Histogram tweaks. #

Patch Set 9 : Sync'd to LKGR. #

Total comments: 18

Patch Set 10 : Incorporated comments and fixed tests. #

Total comments: 18

Patch Set 11 : Incorporated comments and cleaned up from incorporating comments :-}. #

Patch Set 12 : Fix old merge error. #

Total comments: 20

Patch Set 13 : Incorporated comments. #

Total comments: 4

Patch Set 14 : Incorporated comments & cleaned up DFM unit tests. #

Patch Set 15 : Fixed lack of virtual keyword on destructor. #

Total comments: 1

Patch Set 16 : Fixed a clang compilation error. #

Patch Set 17 : Incorporated comments and fixed leak. #

Patch Set 18 : Merged (painfully) to LKGR. #

Patch Set 19 : Fix (hopefully) Windows try job compile failure. #

Patch Set 20 : Sync'd to LKGR. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+970 lines, -1161 lines) Patch
M content/browser/download/base_file.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/download/byte_stream.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +14 lines, -12 lines 0 comments Download
M content/browser/download/byte_stream.cc View 1 2 3 4 5 6 7 8 9 10 19 chunks +50 lines, -50 lines 0 comments Download
M content/browser/download/byte_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 25 chunks +56 lines, -56 lines 0 comments Download
D content/browser/download/download_buffer.h View 1 2 3 4 1 chunk +0 lines, -70 lines 0 comments Download
D content/browser/download/download_buffer.cc View 1 chunk +0 lines, -71 lines 0 comments Download
D content/browser/download/download_buffer_unittest.cc View 1 chunk +0 lines, -123 lines 0 comments Download
M content/browser/download/download_file.h View 2 chunks +0 lines, -8 lines 0 comments Download
M content/browser/download/download_file_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +30 lines, -3 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +134 lines, -7 lines 0 comments Download
M content/browser/download/download_file_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +6 lines, -17 lines 0 comments Download
M content/browser/download/download_file_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +17 lines, -111 lines 0 comments Download
M content/browser/download/download_file_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 14 chunks +28 lines, -298 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 10 chunks +239 lines, -39 lines 0 comments Download
M content/browser/download/download_item_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +24 lines, -7 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 25 chunks +63 lines, -47 lines 0 comments Download
M content/browser/download/download_net_log_parameters.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +17 lines, -0 lines 0 comments Download
M content/browser/download/download_net_log_parameters.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -0 lines 0 comments Download
M content/browser/download/download_resource_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +22 lines, -26 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 chunks +94 lines, -147 lines 0 comments Download
M content/browser/download/download_stats.h View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download
M content/browser/download/download_stats.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +40 lines, -2 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 8 chunks +49 lines, -0 lines 0 comments Download
M content/browser/renderer_host/x509_user_cert_resource_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/x509_user_cert_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +20 lines, -3 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
M content/test/test_file_error_injector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +10 lines, -0 lines 0 comments Download
M net/base/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -3 lines 0 comments Download
M net/url_request/url_request_test_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -0 lines 0 comments Download
M tools/heapcheck/suppressions.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -16 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -33 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Randy Smith (Not in Mondays)
[CCing many people who I think might be interested in this CL. ] Ben: I ...
8 years, 7 months ago (2012-05-19 15:29:56 UTC) #1
Randy Smith (Not in Mondays)
Sorry, should have said for people other than Ben: This CL is dependent on http://codereview.chromium.org/10244001/ ...
8 years, 7 months ago (2012-05-19 15:31:16 UTC) #2
Randy Smith (Not in Mondays)
Added histograms/statistics in PS4. PS3 comments should be read for context.
8 years, 7 months ago (2012-05-21 01:59:50 UTC) #3
benjhayden
http://codereview.chromium.org/10392111/diff/4001/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): http://codereview.chromium.org/10392111/diff/4001/content/browser/download/download_file_impl.cc#newcode69 content/browser/download/download_file_impl.cc:69: // Unretained is safe because the callback is nulled ...
8 years, 7 months ago (2012-05-21 13:44:14 UTC) #4
benjhayden
http://codereview.chromium.org/10392111/diff/8001/content/browser/download/download_file_unittest.cc File content/browser/download/download_file_unittest.cc (right): http://codereview.chromium.org/10392111/diff/8001/content/browser/download/download_file_unittest.cc#newcode1 content/browser/download/download_file_unittest.cc:1: Unnecessary blank line http://codereview.chromium.org/10392111/diff/8001/content/browser/download/download_resource_handler.cc File content/browser/download/download_resource_handler.cc (right): http://codereview.chromium.org/10392111/diff/8001/content/browser/download/download_resource_handler.cc#newcode220 content/browser/download/download_resource_handler.cc:220: ...
8 years, 7 months ago (2012-05-21 14:36:44 UTC) #5
Randy Smith (Not in Mondays)
Darin: Could you review download_resource_handler.* for good ResourceHandler protocol? I'm specifically interested in your opinion ...
8 years, 7 months ago (2012-05-23 03:33:14 UTC) #6
benjhayden
Probably last round. It took me a while to get what you're doing with started_cb, ...
8 years, 7 months ago (2012-05-24 15:35:56 UTC) #7
darin (slow to review)
http://codereview.chromium.org/10392111/diff/21001/content/browser/download/download_resource_handler.cc File content/browser/download/download_resource_handler.cc (left): http://codereview.chromium.org/10392111/diff/21001/content/browser/download/download_resource_handler.cc#oldcode398 content/browser/download/download_resource_handler.cc:398: MaybeResumeRequest(); do we still need this call to MaybeResumeRequest? ...
8 years, 7 months ago (2012-05-24 22:01:35 UTC) #8
Randy Smith (Not in Mondays)
Ben, Darin: PTAL. Ricardo: Could you review resource_dispatcher_host_unittest.cc, url_request_test_job.*, and (while you're there) x509_user_cert_resource_handler.*? The ...
8 years, 7 months ago (2012-05-26 02:36:54 UTC) #9
darin (slow to review)
LGTM for DRH (just nits) http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_resource_handler.cc File content/browser/download/download_resource_handler.cc (right): http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_resource_handler.cc#newcode43 content/browser/download/download_resource_handler.cc:43: static const int kDownloadPipeSize ...
8 years, 7 months ago (2012-05-26 03:59:19 UTC) #10
benjhayden
http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_manager_impl_unittest.cc File content/browser/download/download_manager_impl_unittest.cc (right): http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_manager_impl_unittest.cc#newcode934 content/browser/download/download_manager_impl_unittest.cc:934: void WriteCopyToPipe(content::ByteStreamInput* pipe, inputs before outputs http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_resource_handler.cc File content/browser/download/download_resource_handler.cc ...
8 years, 7 months ago (2012-05-26 20:42:01 UTC) #11
Randy Smith (Not in Mondays)
Ben & Darin's comments incorporated. PTAL. http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_manager_impl_unittest.cc File content/browser/download/download_manager_impl_unittest.cc (right): http://codereview.chromium.org/10392111/diff/28001/content/browser/download/download_manager_impl_unittest.cc#newcode934 content/browser/download/download_manager_impl_unittest.cc:934: void WriteCopyToPipe(content::ByteStreamInput* pipe, ...
8 years, 7 months ago (2012-05-28 02:51:36 UTC) #12
benjhayden
LGTM, one nit http://codereview.chromium.org/10392111/diff/36006/content/browser/download/download_file_impl.h File content/browser/download/download_file_impl.h (right): http://codereview.chromium.org/10392111/diff/36006/content/browser/download/download_file_impl.h#newcode61 content/browser/download/download_file_impl.h:61: protected: // For test class overrides. ...
8 years, 6 months ago (2012-05-29 17:40:37 UTC) #13
rvargas (doing something else)
net and renderer_host LGTM http://codereview.chromium.org/10392111/diff/36006/content/browser/renderer_host/resource_dispatcher_host_unittest.cc File content/browser/renderer_host/resource_dispatcher_host_unittest.cc (right): http://codereview.chromium.org/10392111/diff/36006/content/browser/renderer_host/resource_dispatcher_host_unittest.cc#newcode268 content/browser/renderer_host/resource_dispatcher_host_unittest.cc:268: // This class is a ...
8 years, 6 months ago (2012-05-29 18:13:36 UTC) #14
rvargas (doing something else)
http://codereview.chromium.org/10392111/diff/36006/content/browser/renderer_host/resource_dispatcher_host_unittest.cc File content/browser/renderer_host/resource_dispatcher_host_unittest.cc (right): http://codereview.chromium.org/10392111/diff/36006/content/browser/renderer_host/resource_dispatcher_host_unittest.cc#newcode284 content/browser/renderer_host/resource_dispatcher_host_unittest.cc:284: bool FinalRoundIOPending() { return true; } I forgot about ...
8 years, 6 months ago (2012-05-29 18:32:13 UTC) #15
Randy Smith (Not in Mondays)
I've incorporated comments. Ricardo, if you'd be willing to do one more run on URLRequestTestJob, ...
8 years, 6 months ago (2012-05-30 00:22:31 UTC) #16
rvargas (doing something else)
LGTM http://codereview.chromium.org/10392111/diff/26002/content/browser/renderer_host/resource_dispatcher_host_unittest.cc File content/browser/renderer_host/resource_dispatcher_host_unittest.cc (right): http://codereview.chromium.org/10392111/diff/26002/content/browser/renderer_host/resource_dispatcher_host_unittest.cc#newcode278 content/browser/renderer_host/resource_dispatcher_host_unittest.cc:278: const std::string& response_headers, nit: indent two more spaces ...
8 years, 6 months ago (2012-05-30 00:49:01 UTC) #17
Randy Smith (Not in Mondays)
Hopefully final reviewer-relevant upload. Ben, could you take a look at my changes to download_file_manager_unittest.cc ...
8 years, 6 months ago (2012-05-30 19:36:42 UTC) #18
benjhayden
LGTM, one nit http://codereview.chromium.org/10392111/diff/31039/content/browser/download/download_stats.cc File content/browser/download/download_stats.cc (right): http://codereview.chromium.org/10392111/diff/31039/content/browser/download/download_stats.cc#newcode319 content/browser/download/download_stats.cc:319: "Download.BandwidthNetwork", Include units (looks like Bps?) ...
8 years, 6 months ago (2012-05-30 20:22:32 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10392111/48002
8 years, 6 months ago (2012-06-04 16:30:47 UTC) #20
commit-bot: I haz the power
Failed to apply patch for content/browser/download/download_file_unittest.cc: While running patch -p1 --forward --force; patching file content/browser/download/download_file_unittest.cc ...
8 years, 6 months ago (2012-06-04 16:31:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10392111/63001
8 years, 6 months ago (2012-06-04 16:59:00 UTC) #22
commit-bot: I haz the power
8 years, 6 months ago (2012-06-04 18:21:01 UTC) #23
Change committed as 140328

Powered by Google App Engine
This is Rietveld 408576698