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

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

Issue 10831349: ProfileImpl fix: Don't access DOMStorageContext too early. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index f5bb9c50c11291fcfa411cfd1b5322c773a3272d..d5144b2f038c9fb3e23102ad778aa0910b09724b 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -315,11 +315,6 @@ ProfileImpl::ProfileImpl(const FilePath& path,
} else {
NOTREACHED();
}
-
- if (command_line->HasSwitch(switches::kEnableRestoreSessionState)) {
- content::BrowserContext::GetDefaultDOMStorageContext(this)->
- SetSaveSessionStorageOnDisk();
- }
}
void ProfileImpl::DoFinalInit(bool is_new_profile) {
@@ -427,6 +422,12 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) {
base::Bind(&EnsureReadmeFile, GetPath()),
base::TimeDelta::FromMilliseconds(create_readme_delay_ms));
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableRestoreSessionState)) {
+ content::BrowserContext::GetDefaultDOMStorageContext(this)->
+ SetSaveSessionStorageOnDisk();
+ }
+
// Creation has been finished.
if (delegate_)
delegate_->OnProfileCreated(this, true, is_new_profile);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698