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

Issue 8372073: Merge 8401001 r107836 into branch 912: Fix history importing by delaying DownloadManager creation. (Closed)

Created:
9 years, 1 month ago by benjhayden
Modified:
9 years, 1 month ago
CC:
chromium-reviews, achuith+watch_chromium.org, jam, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, rginda+watch_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Merge 8401001 r107836 into branch 912: Fix history importing by delaying DownloadManager creation. Replace GetNextIdThunkType with DownloadIdFactory (RefCountedThreadSafe, created by DownloadService). DownloadService uses the same DownloadIdFactory for an OTR profile as its original profile. DownloadService passes the DownloadIdFactory into the DownloadManager so that the DownloadManager can allocate new valid ids for items loaded from the history or downloads started on the ui thread. Since the DownloadService precedes and outlives its DownloadManager, DownloadManager does not have a scoped_refptr<DownloadIdFactory>. Objects that do have a scoped_refptr<DownloadIdFactory>: DownloadService, ProfileIOData, ShellBrowserContext, ShellResourceContext. The DownloadIdFactory must be RefCountedThreadSafe because ProfileIOData outlives Profile and because it's used in both the OTR and original profiles. Longer term, the import process should strictly precede profile initialization, and the next_download_id counter should be loaded from the History db strictly before DownloadService is created and creates a DownloadIdFactory. BUG=98966 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108346

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -162 lines) Patch
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/download/download_manager_unittest.cc View 18 chunks +24 lines, -17 lines 0 comments Download
M chrome/browser/download/download_service.h View 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/download/download_service.cc View 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 4 chunks +6 lines, -2 lines 0 comments Download
M content/browser/download/download_create_info.h View 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/download/download_create_info.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/download/download_file.h View 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/download/download_file.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_file_manager.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 6 chunks +10 lines, -2 lines 0 comments Download
M content/browser/download/download_id.h View 6 chunks +20 lines, -22 lines 0 comments Download
M content/browser/download/download_id.cc View 1 chunk +9 lines, -1 line 0 comments Download
A content/browser/download/download_id_factory.h View 1 chunk +33 lines, -0 lines 0 comments Download
A content/browser/download/download_id_factory.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M content/browser/download/download_id_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_item.h View 3 chunks +4 lines, -3 lines 0 comments Download
M content/browser/download/download_item.cc View 4 chunks +3 lines, -7 lines 0 comments Download
M content/browser/download/download_manager.h View 7 chunks +5 lines, -24 lines 0 comments Download
M content/browser/download/download_manager.cc View 5 chunks +8 lines, -26 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/download/mock_download_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/buffered_resource_handler.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_unittest.cc View 4 chunks +9 lines, -10 lines 0 comments Download
M content/browser/resource_context.h View 3 chunks +4 lines, -6 lines 0 comments Download
M content/browser/resource_context.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M content/content_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/shell_browser_context.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/shell/shell_browser_context.cc View 4 chunks +6 lines, -3 lines 0 comments Download
M content/shell/shell_resource_context.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/shell/shell_resource_context.cc View 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
benjhayden
PTAL and add appropriate reviewers. What is the correct value for svn:eol-style, and how do ...
9 years, 1 month ago (2011-11-02 19:20:35 UTC) #1
Randy Smith (Not in Mondays)
On 2011/11/02 19:20:35, b s h wrote: > PTAL and add appropriate reviewers. Usually merges ...
9 years, 1 month ago (2011-11-02 19:34:03 UTC) #2
Miranda Callahan
On 2011/11/02 19:20:35, b s h wrote: > PTAL and add appropriate reviewers. > > ...
9 years, 1 month ago (2011-11-02 19:37:34 UTC) #3
Randy Smith (Not in Mondays)
LGTM presuming it compiles.
9 years, 1 month ago (2011-11-02 19:44:28 UTC) #4
benjhayden
Yep, it compiles and runs on my linux machine. Running browser tests locally now. On ...
9 years, 1 month ago (2011-11-02 19:49:25 UTC) #5
Miranda Callahan
On 2011/11/02 19:49:25, b s h wrote: > Yep, it compiles and runs on my ...
9 years, 1 month ago (2011-11-02 19:55:21 UTC) #6
benjhayden
Where is the branch waterfall? Three tests are failing: BrowserTest.TestNewTabExitsFullscreen, BrowserTest.TestTabExitsItselfFromFullscreen, BrowserTest.TestFullscreenBubbleMouseLockState. They all time ...
9 years, 1 month ago (2011-11-02 20:41:38 UTC) #7
benjhayden
Presubmit says I need an LGTM from an owner for content/browser/*. I ran content_unittests, browser_tests, ...
9 years, 1 month ago (2011-11-02 21:17:31 UTC) #8
Avi (use Gerrit)
owner rubberstamp lgtm
9 years, 1 month ago (2011-11-02 21:21:27 UTC) #9
benjhayden
9 years, 1 month ago (2011-11-02 21:25:14 UTC) #10
Committed to 912 with --no_presubmit. I'll check the waterfall when I get home
in 20 mins.
Apologies for the noise.
Maybe presubmit could ignore the main tree if it's going to commit to a branch.
:-)

Powered by Google App Engine
This is Rietveld 408576698