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

Unified Diff: content/shell/shell_browser_context.cc

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix ifndefs Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/shell/shell_resource_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_browser_context.cc
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc
index 94ab2f1e458a217cdf249120ffcbf200c96a1484..78bef357659a00f858816efa8d0ae8c3016477af 100644
--- a/content/shell/shell_browser_context.cc
+++ b/content/shell/shell_browser_context.cc
@@ -9,6 +9,7 @@
#include "base/path_service.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/chrome_blob_storage_context.h"
+#include "content/browser/download/download_id_factory.h"
#include "content/browser/download/download_manager.h"
#include "content/browser/download/download_status_updater.h"
#include "content/browser/file_system/browser_file_system_helper.h"
@@ -80,7 +81,8 @@ namespace content {
ShellBrowserContext::ShellBrowserContext(
ShellBrowserMainParts* shell_main_parts)
- : shell_main_parts_(shell_main_parts) {
+ : download_id_factory_(new DownloadIdFactory(this)),
+ shell_main_parts_(shell_main_parts) {
}
ShellBrowserContext::~ShellBrowserContext() {
@@ -123,6 +125,7 @@ DownloadManager* ShellBrowserContext::GetDownloadManager() {
download_manager_delegate_ = new ShellDownloadManagerDelegate();
download_manager_ = new DownloadManager(download_manager_delegate_,
+ download_id_factory_,
download_status_updater_.get());
download_manager_delegate_->SetDownloadManager(download_manager_.get());
download_manager_->Init(this);
@@ -156,7 +159,7 @@ const ResourceContext& ShellBrowserContext::GetResourceContext() {
resource_context_.reset(new ShellResourceContext(
static_cast<ShellURLRequestContextGetter*>(GetRequestContext()),
GetBlobStorageContext(),
- GetDownloadManager()->GetNextIdThunk()));
+ download_id_factory_));
}
return *resource_context_.get();
}
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/shell/shell_resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698