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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments 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
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 7f138d084102e0f3fc02da9f3e5bb51ea43a3616..52838a7f9d79825fd293dd305b0ffb2ab023e1f1 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -17,6 +17,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
+#include "chrome/browser/download/download_service.h"
+#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/browser/extensions/extension_protocols.h"
#include "chrome/browser/io_thread.h"
@@ -42,6 +44,7 @@
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/browser_thread.h"
#include "content/browser/chrome_blob_storage_context.h"
+#include "content/browser/download/download_id_factory.h"
#include "content/browser/host_zoom_map.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
@@ -186,7 +189,8 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PrefService* pref_service = profile->GetPrefs();
- next_download_id_thunk_ = profile->GetDownloadManager()->GetNextIdThunk();
+ download_id_factory_ = DownloadServiceFactory::GetForProfile(profile)->
+ GetDownloadIdFactory();
scoped_ptr<ProfileParams> params(new ProfileParams);
params->path = profile->GetPath();
@@ -500,7 +504,7 @@ void ProfileIOData::LazyInitialize() const {
resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this));
resource_context_.set_media_observer(
io_thread_globals->media.media_internals.get());
- resource_context_.set_next_download_id_thunk(next_download_id_thunk_);
+ resource_context_.set_download_id_factory(download_id_factory_);
resource_context_.set_media_stream_manager(media_stream_manager_.get());
LazyInitializeInternal(profile_params_.get());

Powered by Google App Engine
This is Rietveld 408576698