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

Issue 2880933002: Download driver for components/download. (Closed)

Created:
3 years, 7 months ago by xingliu
Modified:
3 years, 7 months ago
CC:
blundell+watchlist_chromium.org, chromium-reviews, darin-cc_chromium.org, droger+watchlist_chromium.org, jam, sdefresne+watchlist_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Download driver for components/download. This CL introduces the glue layer between //components/download and //content. The DownloadDriver interface will be the only place to access content functionalities from download service. Also provides a test support class for //components/download code. The test support version of DownloadManager is not done in this CL. The response/request headers pumping is not done in this CL, which requires tweak on download network code. BUG=717180 Review-Url: https://codereview.chromium.org/2880933002 Cr-Commit-Position: refs/heads/master@{#474191} Committed: https://chromium.googlesource.com/chromium/src/+/d64fde65aa583828811a43bddb897726590a403a

Patch Set 1 #

Total comments: 20

Patch Set 2 : Work on feedbacks. #

Total comments: 22

Patch Set 3 : Work on feedback. #

Total comments: 4

Patch Set 4 : Work on feedback. #

Patch Set 5 : Fix windows compiling. #

Total comments: 2

Patch Set 6 : DEPS polish. #

Total comments: 2

Patch Set 7 : Polish manager logic. #

Total comments: 7

Patch Set 8 : use MakeRefCounted. #

Patch Set 9 : Add a TODO for guid collision. #

Patch Set 10 : Polish comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+794 lines, -7 lines) Patch
M chrome/browser/download/download_history.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_ui_controller_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A components/download/content/BUILD.gn View 2 1 chunk +42 lines, -0 lines 0 comments Download
A components/download/content/DEPS View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A components/download/content/download_driver_impl.h View 1 2 3 4 5 6 1 chunk +67 lines, -0 lines 0 comments Download
A components/download/content/download_driver_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +188 lines, -0 lines 0 comments Download
A components/download/content/download_driver_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +129 lines, -0 lines 0 comments Download
M components/download/internal/BUILD.gn View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M components/download/internal/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A components/download/internal/download_driver.h View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 0 comments Download
A components/download/internal/driver_entry.h View 1 2 3 1 chunk +61 lines, -0 lines 0 comments Download
A components/download/internal/driver_entry.cc View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M components/download/internal/test/BUILD.gn View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A components/download/internal/test/test_download_driver.h View 1 2 3 4 5 6 1 chunk +53 lines, -0 lines 0 comments Download
A components/download/internal/test/test_download_driver.cc View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 0 comments Download
M content/browser/download/download_create_info.h View 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/download/download_item_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/download_manager_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/download/download_request_core.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/download_request_core.cc View 1 2 3 5 chunks +5 lines, -0 lines 0 comments Download
M content/public/browser/download_manager.h View 2 chunks +9 lines, -0 lines 0 comments Download
M content/public/browser/download_url_parameters.h View 3 chunks +7 lines, -0 lines 0 comments Download
M content/public/test/fake_download_item.h View 1 3 chunks +4 lines, -1 line 0 comments Download
M content/public/test/fake_download_item.cc View 1 3 chunks +5 lines, -3 lines 0 comments Download
M content/public/test/mock_download_manager.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 68 (30 generated)
xingliu
Hi, PTAL, thanks.
3 years, 7 months ago (2017-05-15 16:56:30 UTC) #6
David Trainor- moved to gerrit
https://codereview.chromium.org/2880933002/diff/1/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/1/components/download/content/download_driver_impl.cc#newcode36 components/download/content/download_driver_impl.cc:36: // TODO(xingliu): Handles the request headers from |params|, needs ...
3 years, 7 months ago (2017-05-15 20:08:15 UTC) #7
David Trainor- moved to gerrit
3 years, 7 months ago (2017-05-16 16:52:03 UTC) #9
xingliu
Thanks for the feedback, PTAL. https://codereview.chromium.org/2880933002/diff/1/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/1/components/download/content/download_driver_impl.cc#newcode36 components/download/content/download_driver_impl.cc:36: // TODO(xingliu): Handles the ...
3 years, 7 months ago (2017-05-17 19:34:52 UTC) #10
David Trainor- moved to gerrit
https://codereview.chromium.org/2880933002/diff/20001/components/download/content/BUILD.gn File components/download/content/BUILD.gn (right): https://codereview.chromium.org/2880933002/diff/20001/components/download/content/BUILD.gn#newcode14 components/download/content/BUILD.gn:14: "driver_entry.cc", This needs to be in internal. https://codereview.chromium.org/2880933002/diff/20001/components/download/content/DEPS File ...
3 years, 7 months ago (2017-05-18 18:29:45 UTC) #11
xingliu
Hi, thanks for the review, PTAL, fixed the dependency issue in driver_entry.h https://codereview.chromium.org/2880933002/diff/20001/components/download/content/BUILD.gn File components/download/content/BUILD.gn ...
3 years, 7 months ago (2017-05-18 22:21:50 UTC) #16
David Trainor- moved to gerrit
lgtm % optional check and valid() removal. https://codereview.chromium.org/2880933002/diff/40001/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/40001/components/download/content/download_driver_impl.cc#newcode43 components/download/content/download_driver_impl.cc:43: if (!item) ...
3 years, 7 months ago (2017-05-18 23:51:19 UTC) #17
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/2880933002/60001
3 years, 7 months ago (2017-05-19 02:26:34 UTC) #23
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/441985)
3 years, 7 months ago (2017-05-19 02:37:22 UTC) #25
xingliu
Hi, PTAL, thanks. +jochen@ for DEPS file review: components/download/content/DEPS review. +nick@ for content/public review.
3 years, 7 months ago (2017-05-19 17:25:06 UTC) #29
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2880933002/diff/80001/components/download/content/DEPS File components/download/content/DEPS (right): https://codereview.chromium.org/2880933002/diff/80001/components/download/content/DEPS#newcode2 components/download/content/DEPS:2: "+content", should be content/public/browser
3 years, 7 months ago (2017-05-22 11:58:05 UTC) #32
xingliu
https://codereview.chromium.org/2880933002/diff/40001/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/40001/components/download/content/download_driver_impl.cc#newcode43 components/download/content/download_driver_impl.cc:43: if (!item) On 2017/05/18 23:51:19, David Trainor-ping if over ...
3 years, 7 months ago (2017-05-22 16:41:04 UTC) #33
ncarter (slow)
content/public lgtm
3 years, 7 months ago (2017-05-22 17:03:46 UTC) #34
qinmin
https://codereview.chromium.org/2880933002/diff/100001/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/100001/components/download/content/download_driver_impl.cc#newcode157 components/download/content/download_driver_impl.cc:157: manager->RemoveObserver(this); is this needed?
3 years, 7 months ago (2017-05-22 17:16:41 UTC) #35
xingliu
Thanks for the reviews. https://codereview.chromium.org/2880933002/diff/100001/components/download/content/download_driver_impl.cc File components/download/content/download_driver_impl.cc (right): https://codereview.chromium.org/2880933002/diff/100001/components/download/content/download_driver_impl.cc#newcode157 components/download/content/download_driver_impl.cc:157: manager->RemoveObserver(this); On 2017/05/22 17:16:41, qinmin ...
3 years, 7 months ago (2017-05-22 18:22:07 UTC) #36
xingliu
Ping~.
3 years, 7 months ago (2017-05-23 00:00:15 UTC) #37
xingliu
+dcheng@, PTAL at change in components/download/content/DEPS. for +base deps. +asanka@, PTAL at change in components/download/content/DEPS. ...
3 years, 7 months ago (2017-05-23 01:18:04 UTC) #39
qinmin
https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/driver_entry.h File components/download/internal/driver_entry.h (right): https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/driver_entry.h#newcode24 components/download/internal/driver_entry.h:24: struct DriverEntry { download_row has a lot of information ...
3 years, 7 months ago (2017-05-23 04:21:25 UTC) #40
dcheng
base deps lgtm https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/test/test_download_driver.cc File components/download/internal/test/test_download_driver.cc (right): https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/test/test_download_driver.cc#newcode64 components/download/internal/test/test_download_driver.cc:64: make_scoped_refptr(new net::HttpResponseHeaders("HTTP/1.1 200")); Nit: consider using ...
3 years, 7 months ago (2017-05-23 05:35:09 UTC) #41
jochen (gone - plz use gerrit)
deps lgtm
3 years, 7 months ago (2017-05-23 11:14:05 UTC) #42
xingliu
https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/driver_entry.h File components/download/internal/driver_entry.h (right): https://codereview.chromium.org/2880933002/diff/120001/components/download/internal/driver_entry.h#newcode24 components/download/internal/driver_entry.h:24: struct DriverEntry { On 2017/05/23 04:21:24, qinmin wrote: > ...
3 years, 7 months ago (2017-05-23 16:56:13 UTC) #43
qinmin
https://codereview.chromium.org/2880933002/diff/120001/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2880933002/diff/120001/content/browser/download/download_item_impl.cc#newcode206 content/browser/download/download_item_impl.cc:206: : guid_(info.guid.empty() ? base::ToUpperASCII(base::GenerateGUID()) On 2017/05/23 16:56:13, xingliu wrote: ...
3 years, 7 months ago (2017-05-23 18:12:17 UTC) #44
xingliu
On 2017/05/23 18:12:17, qinmin wrote: > https://codereview.chromium.org/2880933002/diff/120001/content/browser/download/download_item_impl.cc > File content/browser/download/download_item_impl.cc (right): > > https://codereview.chromium.org/2880933002/diff/120001/content/browser/download/download_item_impl.cc#newcode206 > ...
3 years, 7 months ago (2017-05-23 18:28:33 UTC) #45
qinmin
On 2017/05/23 18:28:33, xingliu wrote: > On 2017/05/23 18:12:17, qinmin wrote: > > > https://codereview.chromium.org/2880933002/diff/120001/content/browser/download/download_item_impl.cc ...
3 years, 7 months ago (2017-05-23 18:34:53 UTC) #46
xingliu
On 2017/05/23 18:34:53, qinmin wrote: > On 2017/05/23 18:28:33, xingliu wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 20:33:29 UTC) #47
qinmin
On 2017/05/23 20:33:29, xingliu wrote: > On 2017/05/23 18:34:53, qinmin wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 20:42:18 UTC) #48
xingliu
On 2017/05/23 20:42:18, qinmin wrote: > On 2017/05/23 20:33:29, xingliu wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 20:51:02 UTC) #49
qinmin
On 2017/05/23 20:51:02, xingliu wrote: > On 2017/05/23 20:42:18, qinmin wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 21:01:16 UTC) #50
qinmin
On 2017/05/23 20:51:02, xingliu wrote: > On 2017/05/23 20:42:18, qinmin wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 21:01:18 UTC) #51
David Trainor- moved to gerrit
On 2017/05/23 21:01:18, qinmin wrote: > On 2017/05/23 20:51:02, xingliu wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 21:14:45 UTC) #52
xingliu
On 2017/05/23 21:01:18, qinmin wrote: > On 2017/05/23 20:51:02, xingliu wrote: > > On 2017/05/23 ...
3 years, 7 months ago (2017-05-23 21:16:52 UTC) #53
qinmin
On 2017/05/23 21:14:45, David Trainor-ping if over 24h wrote: > On 2017/05/23 21:01:18, qinmin wrote: ...
3 years, 7 months ago (2017-05-23 21:23:31 UTC) #54
David Trainor- moved to gerrit
On 2017/05/23 21:23:31, qinmin wrote: > On 2017/05/23 21:14:45, David Trainor-ping if over 24h wrote: ...
3 years, 7 months ago (2017-05-23 21:26:40 UTC) #55
qinmin
On 2017/05/23 21:26:40, David Trainor-ping if over 24h wrote: > On 2017/05/23 21:23:31, qinmin wrote: ...
3 years, 7 months ago (2017-05-23 21:31:39 UTC) #56
xingliu
Thanks for the review, added a TODO for guid collision.
3 years, 7 months ago (2017-05-23 21:52:12 UTC) #57
qinmin
On 2017/05/23 21:52:12, xingliu wrote: > Thanks for the review, added a TODO for guid ...
3 years, 7 months ago (2017-05-23 21:54:59 UTC) #58
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/2880933002/180001
3 years, 7 months ago (2017-05-24 02:55:23 UTC) #65
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 07:04:51 UTC) #68
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/d64fde65aa583828811a43bddb89...

Powered by Google App Engine
This is Rietveld 408576698