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

Issue 1533583002: [Downloads] Factor out request handling logic between DRH and UD. (Closed)

Created:
5 years ago by asanka
Modified:
5 years ago
Reviewers:
svaldez
CC:
chromium-reviews, asanka, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Downloads] Factor out request handling logic between DRH and UD. DownloadResourceHandler and UrlDownloader both have a lot in common since they are both responsible for driving a URL request. The only difference being that DRH is written to be a part of the ResourceLoader stack, while UrlDownloader drives a URLRequest on its own. This CL factors out the common bits in both so that upcoming fixes to downloads resumption can be made and tested in one location. R=svaldez@chromium.org BUG=7648 BUG=225901 Committed: https://crrev.com/64114156487081d877b793d3a501a8658743141d Cr-Commit-Position: refs/heads/master@{#366459}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Tests and some more cleanup of unused headers. #

Patch Set 4 : Why aren't there tests for sniffed MIME types? #

Total comments: 8

Patch Set 5 : Address comments and change .Pass() -> std::move(...) per PRESUBMIT check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+380 lines, -601 lines) Patch
M content/browser/download/download_browsertest.cc View 1 2 3 4 3 chunks +82 lines, -1 line 0 comments Download
M content/browser/download/download_create_info.h View 1 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/download/download_create_info.cc View 1 2 3 4 1 chunk +15 lines, -22 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 3 4 5 chunks +15 lines, -19 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_request_core.h View 1 3 chunks +50 lines, -39 lines 0 comments Download
M content/browser/download/download_request_core.cc View 1 2 3 4 12 chunks +24 lines, -96 lines 0 comments Download
M content/browser/download/download_request_handle.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_request_handle.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/download/download_resource_handler.h View 1 2 4 chunks +6 lines, -33 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 2 3 4 11 chunks +48 lines, -345 lines 0 comments Download
M content/browser/download/url_downloader.h View 1 2 3 4 2 chunks +18 lines, -7 lines 0 comments Download
M content/browser/download/url_downloader.cc View 1 2 3 4 9 chunks +113 lines, -32 lines 0 comments Download
A content/test/data/download/gzip-content.gz View 1 2 3 Binary file 0 comments Download
A content/test/data/download/gzip-content.gz.mock-http-headers View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (4 generated)
asanka
Could you have a look? The existing tests should cover all the changes being made ...
5 years ago (2015-12-16 19:27:14 UTC) #1
svaldez
LGTM. Mostly just nits. I took a quick look to make sure that there isn't ...
5 years ago (2015-12-17 16:53:33 UTC) #2
asanka
https://codereview.chromium.org/1533583002/diff/60001/content/browser/download/download_create_info.cc File content/browser/download/download_create_info.cc (right): https://codereview.chromium.org/1533583002/diff/60001/content/browser/download/download_create_info.cc#newcode30 content/browser/download/download_create_info.cc:30: make_scoped_ptr(new DownloadSaveInfo())) {} On 2015/12/17 16:53:32, svaldez wrote: > ...
5 years ago (2015-12-21 20:14:02 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1533583002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1533583002/80001
5 years ago (2015-12-21 20:14:11 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1533583002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1533583002/80001
5 years ago (2015-12-21 21:02:36 UTC) #8
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-12-21 21:28:56 UTC) #9
commit-bot: I haz the power
5 years ago (2015-12-21 21:29:37 UTC) #11
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/64114156487081d877b793d3a501a8658743141d
Cr-Commit-Position: refs/heads/master@{#366459}

Powered by Google App Engine
This is Rietveld 408576698