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); |