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 969560b2c0237ac52e5c1e545e3d138b7d0d1b97..e3a7d9a97524156e19ef43cb1bc6655335ab8e6e 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -191,6 +191,8 @@ void ProfileIOData::InitializeProfileParams(Profile* profile) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
PrefService* pref_service = profile->GetPrefs(); |
+ next_download_id_thunk_ = profile->GetDownloadManager()->GetNextIdThunk(); |
Randy Smith (Not in Mondays)
2011/07/28 21:03:16
Why is this in ProfileIOData as well as ResourceCo
benjhayden
2011/08/03 17:44:46
Yes, next_download_id_thunk_ is used in LazyInitia
|
+ |
scoped_ptr<ProfileParams> params(new ProfileParams); |
params->is_incognito = profile->IsOffTheRecord(); |
params->clear_local_state_on_exit = |
@@ -503,6 +505,9 @@ 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_.SetUserData(reinterpret_cast<void*>( |
+ BASE_HASH_NAMESPACE::hash<std::string>()("next_download_id_thunk")), |
+ &next_download_id_thunk_); |
Randy Smith (Not in Mondays)
2011/07/28 21:03:16
I presume that the whole nasty reinterpret_cast<>
benjhayden
2011/08/03 17:44:46
Done.
|
LazyInitializeInternal(profile_params_.get()); |