Index: chrome/browser/ui/startup/startup_browser_creator.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc |
index 20f8ceacbc74547c6f0362231cbd9500af1882bd..4d0c135c38c75716c753e4dd71eda7f4d884ae2e 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc |
@@ -362,8 +362,11 @@ SessionStartupPref StartupBrowserCreator::GetSessionStartupPref( |
#if defined(OS_CHROMEOS) |
const bool is_first_run = |
user_manager::UserManager::Get()->IsCurrentUserNew(); |
+ // A controlled restart on ChromeOS should respect the session restore state. |
+ const bool did_restart = false; |
sky
2014/10/15 23:57:20
Won't this mean if you change an about:flag and cl
sky
2014/10/16 20:35:27
This comment is confusing. I think you mean someth
Mr4D (OOO till 08-26)
2014/10/16 20:58:43
Done.
|
#else |
const bool is_first_run = first_run::IsChromeFirstRun(); |
+ const bool did_restart = StartupBrowserCreator::WasRestarted(); |
#endif |
// The pref has an OS-dependent default value. For the first run only, this |
@@ -379,8 +382,7 @@ SessionStartupPref StartupBrowserCreator::GetSessionStartupPref( |
// However, new profiles can be created from a browser process that has this |
// switch so do not set the session pref to SessionStartupPref::LAST for |
// those as there is nothing to restore. |
- if ((command_line.HasSwitch(switches::kRestoreLastSession) || |
- StartupBrowserCreator::WasRestarted()) && |
+ if ((command_line.HasSwitch(switches::kRestoreLastSession) || did_restart) && |
!profile->IsNewProfile()) { |
pref.type = SessionStartupPref::LAST; |
} |