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

Issue 15701007: BrowserContext should simply own DownloadManager (Closed)

Created:
7 years, 7 months ago by cmarcelo
Modified:
7 years, 6 months ago
CC:
chromium-reviews, benjhayden+dwatch_chromium.org, asanka, darin-cc_chromium.org, jam, joi+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

BrowserContext should simply own DownloadManager This patch changes BrowserContext so it store a DownloadManager directly (as UserData), instead of storing a refptr to it. Client code (mostly tests) that used refptrs was changed to use either raw pointers or to use scoped_ptr/ScopedVector in case of DownloadManagers created by it. The Bind() in DownloadManagerImpl::CheckForFileRemoval() is now using a weak pointer to itself. BUG=237871 TEST=content_unittests and {unit,browser}_tests with *Download* and *SavePage* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202743

Patch Set 1 #

Total comments: 4

Patch Set 2 : Update after sky's comments #

Patch Set 3 : Fix ChromeOS #

Patch Set 4 : Fix ChromeOS take 2 #

Patch Set 5 : Rebased version of patch for win_rel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -77 lines) Patch
M chrome/browser/chromeos/drive/download_handler_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/download/all_download_item_notifier_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/download/download_history_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_shelf_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/download/download_status_updater_unittest.cc View 1 2 3 4 7 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/download/download_ui_controller_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/browser_context.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/download/download_id_unittest.cc View 1 3 chunks +10 lines, -22 lines 0 comments Download
M content/browser/download/download_manager_impl.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M content/public/browser/download_manager.h View 2 chunks +3 lines, -8 lines 0 comments Download
M content/public/test/mock_download_manager.h View 2 chunks +1 line, -3 lines 0 comments Download
M content/public/test/test_file_error_injector.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M content/public/test/test_file_error_injector.cc View 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
cmarcelo
Could you take a look at this change? I had a previous attempt but was ...
7 years, 7 months ago (2013-05-23 20:02:43 UTC) #1
cmarcelo
Adding joi and sky benjhayden: main reviewer joi: content/public/browser sky: content/public/browser/test and content/browser
7 years, 7 months ago (2013-05-23 20:03:47 UTC) #2
Jói
LGTM for //content/public.
7 years, 7 months ago (2013-05-23 21:16:28 UTC) #3
sky
LGTM https://codereview.chromium.org/15701007/diff/1/content/browser/download/download_id_unittest.cc File content/browser/download/download_id_unittest.cc (right): https://codereview.chromium.org/15701007/diff/1/content/browser/download/download_id_unittest.cc#newcode28 content/browser/download/download_id_unittest.cc:28: // Sort by pointer value. Most unusual. Your ...
7 years, 7 months ago (2013-05-23 21:55:53 UTC) #4
cmarcelo
Updated after sky's comments.
7 years, 7 months ago (2013-05-24 10:35:15 UTC) #5
sky
LGTM
7 years, 7 months ago (2013-05-24 16:15:17 UTC) #6
benjhayden
LGTM Thanks for your help!
7 years, 7 months ago (2013-05-24 19:09:40 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/caio.de.oliveira.filho@intel.com/15701007/11001
7 years, 7 months ago (2013-05-24 20:00:54 UTC) #8
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-24 20:29:01 UTC) #9
cmarcelo
Fixing the code for ChromeOS, then will use trybot to check.
7 years, 7 months ago (2013-05-24 20:30:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/caio.de.oliveira.filho@intel.com/15701007/18008
7 years, 7 months ago (2013-05-24 21:57:07 UTC) #11
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) chrome_frame_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=153912
7 years, 7 months ago (2013-05-25 01:33:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/caio.de.oliveira.filho@intel.com/15701007/46001
7 years, 6 months ago (2013-05-28 22:09:40 UTC) #13
commit-bot: I haz the power
7 years, 6 months ago (2013-05-29 02:18:07 UTC) #14
Message was sent while issue was closed.
Change committed as 202743

Powered by Google App Engine
This is Rietveld 408576698