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

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

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 years, 10 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 | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
===================================================================
--- chrome/browser/profiles/profile_impl_io_data.cc (revision 122721)
+++ chrome/browser/profiles/profile_impl_io_data.cc (working copy)
@@ -223,6 +223,9 @@
void ProfileImplIOData::Handle::LazyInitialize() const {
if (!initialized_) {
+ // Set initialized_ to true at the beginning in case any of the objects
+ // below try to get the ResourceContext pointer.
+ initialized_ = true;
io_data_->InitializeOnUIThread(profile_);
PrefService* pref_service = profile_->GetPrefs();
io_data_->http_server_properties_manager_.reset(
@@ -240,7 +243,6 @@
pref_service, NULL);
io_data_->safe_browsing_enabled()->MoveToThread(BrowserThread::IO);
#endif
- initialized_ = true;
}
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698