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

Issue 10900010: Remove DownloadFileManager in favor of direct ownership of DownloadFiles. (Closed)

Created:
8 years, 3 months ago by Randy Smith (Not in Mondays)
Modified:
8 years, 3 months ago
Reviewers:
craigdh, benjhayden, jam
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, rginda+watch_chromium.org, jam, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

Remove DownloadFileManager in favor of direct ownership of DownloadFiles. This CL is equivalent to CLs * http://codereview.chromium.org/10799005, * http://codereview.chromium.org/10836293, * https://chromiumcodereview.appspot.com/10823406, and * http://codereview.chromium.org/10867065 which were previous attempts to land the same functionality. R=benjhayden@chromium.org TBR=jam@chromium.org BUG=123998 BUG=144751 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154294

Patch Set 1 #

Patch Set 2 : Always wait for the download item to be persisted. #

Patch Set 3 : Fix compilation errors. #

Patch Set 4 : Fixed race conditions and fixed a bug in downloads.py. #

Total comments: 4

Patch Set 5 : Incorporated comments. #

Patch Set 6 : Incorporating comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1280 lines, -1728 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/download/save_page_browsertest.cc View 1 2 3 4 16 chunks +139 lines, -29 lines 0 comments Download
M chrome/test/functional/downloads.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_context.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/browser_main_loop.cc View 2 chunks +1 line, -4 lines 0 comments Download
M content/browser/download/base_file.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/download/base_file.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/download/download_file.h View 4 chunks +13 lines, -11 lines 0 comments Download
A content/browser/download/download_file_factory.h View 1 chunk +44 lines, -0 lines 0 comments Download
A content/browser/download/download_file_factory.cc View 1 chunk +32 lines, -0 lines 0 comments Download
M content/browser/download/download_file_impl.h View 5 chunks +22 lines, -25 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 8 chunks +65 lines, -64 lines 0 comments Download
D content/browser/download/download_file_manager.h View 1 chunk +0 lines, -180 lines 0 comments Download
D content/browser/download/download_file_manager.cc View 1 chunk +0 lines, -227 lines 0 comments Download
D content/browser/download/download_file_manager_unittest.cc View 1 chunk +0 lines, -413 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 16 chunks +66 lines, -83 lines 0 comments Download
M content/browser/download/download_item_impl.h View 9 chunks +45 lines, -16 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 3 19 chunks +200 lines, -45 lines 0 comments Download
M content/browser/download/download_item_impl_delegate.h View 1 chunk +12 lines, -2 lines 0 comments Download
M content/browser/download/download_item_impl_delegate.cc View 2 chunks +9 lines, -4 lines 0 comments Download
M content/browser/download/download_item_impl_unittest.cc View 22 chunks +165 lines, -78 lines 0 comments Download
M content/browser/download/download_manager_impl.h View 10 chunks +25 lines, -28 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 3 22 chunks +62 lines, -173 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 19 chunks +100 lines, -82 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/download/mock_download_file.h View 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/download/mock_download_file.cc View 1 chunk +10 lines, -2 lines 0 comments Download
M content/browser/download/save_package.cc View 8 chunks +46 lines, -15 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_impl.h View 3 chunks +0 lines, -8 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_impl.cc View 2 chunks +1 line, -3 lines 0 comments Download
M content/content_browser.gypi View 2 chunks +3 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 chunk +0 lines, -1 line 0 comments Download
A content/public/browser/download_destination_observer.h View 1 chunk +37 lines, -0 lines 0 comments Download
M content/public/browser/download_manager.h View 1 chunk +0 lines, -23 lines 0 comments Download
M content/public/test/mock_download_manager.h View 1 chunk +2 lines, -12 lines 0 comments Download
M content/public/test/test_file_error_injector.h View 6 chunks +18 lines, -16 lines 0 comments Download
M content/public/test/test_file_error_injector.cc View 13 chunks +152 lines, -170 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Randy Smith (Not in Mondays)
Ben, PTAL. I'd love to think hard about race conditions here (so as to minimize ...
8 years, 3 months ago (2012-08-28 21:11:57 UTC) #1
Randy Smith (Not in Mondays)
Ben and I talked offline; this is the result of our conversation: + There are ...
8 years, 3 months ago (2012-08-29 20:39:15 UTC) #2
benjhayden
Yep, making DI::SetIsPersisted() update observers should handle both cases in DownloadManagerImpl::SavePageDownloadFinished() and DownloadManagerImpl::OnSavePageItemAddedToPersistentStore() where the ...
8 years, 3 months ago (2012-08-29 21:00:22 UTC) #3
Randy Smith (Not in Mondays)
Ben: PTAL at the main body of the patch. craigdh@: Could you review the downloads.py ...
8 years, 3 months ago (2012-08-30 00:13:07 UTC) #4
craigdh
On 2012/08/30 00:13:07, rdsmith wrote: > Ben: PTAL at the main body of the patch. ...
8 years, 3 months ago (2012-08-30 00:41:55 UTC) #5
Randy Smith (Not in Mondays)
On 2012/08/30 00:41:55, craigdh wrote: > On 2012/08/30 00:13:07, rdsmith wrote: > > Ben: PTAL ...
8 years, 3 months ago (2012-08-30 02:48:17 UTC) #6
benjhayden
LGTM, one request and one thinker. http://codereview.chromium.org/10900010/diff/12001/chrome/browser/download/save_page_browsertest.cc File chrome/browser/download/save_page_browsertest.cc (right): http://codereview.chromium.org/10900010/diff/12001/chrome/browser/download/save_page_browsertest.cc#newcode89 chrome/browser/download/save_page_browsertest.cc:89: const std::vector<DownloadItem*>& WaitForDownloadItem() ...
8 years, 3 months ago (2012-08-30 17:31:15 UTC) #7
Randy Smith (Not in Mondays)
http://codereview.chromium.org/10900010/diff/12001/chrome/browser/download/save_page_browsertest.cc File chrome/browser/download/save_page_browsertest.cc (right): http://codereview.chromium.org/10900010/diff/12001/chrome/browser/download/save_page_browsertest.cc#newcode89 chrome/browser/download/save_page_browsertest.cc:89: const std::vector<DownloadItem*>& WaitForDownloadItem() { On 2012/08/30 17:31:15, benjhayden_chromium wrote: ...
8 years, 3 months ago (2012-08-30 19:44:09 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10900010/21001
8 years, 3 months ago (2012-08-30 19:49:17 UTC) #9
commit-bot: I haz the power
8 years, 3 months ago (2012-08-30 22:42:31 UTC) #10
Change committed as 154294

Powered by Google App Engine
This is Rietveld 408576698