Index: chrome/browser/ui/browser_list.cc |
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc |
index daaead65e414840c0c2c728f111c15a82183655a..8205058285cc303550430ae2bc95c8a3aebd174f 100644 |
--- a/chrome/browser/ui/browser_list.cc |
+++ b/chrome/browser/ui/browser_list.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/browser_list.h" |
+#include "base/command_line.h" |
#include "base/logging.h" |
#include "base/message_loop.h" |
#include "base/metrics/histogram.h" |
@@ -14,10 +15,12 @@ |
#include "chrome/browser/metrics/thread_watcher.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/printing/background_printing_manager.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "content/browser/tab_contents/navigation_details.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -513,6 +516,15 @@ void BrowserList::AttemptRestart() { |
// Same session restore behavior happens in case of full restart after update. |
AttemptUserExit(); |
#else |
+ |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
erikwright (departed)
2011/11/28 16:18:16
Should this not be occurring for ChromeOS?
marja
2011/11/29 12:56:01
Made it occur also for ChromeOS.
|
+ switches::kEnableRestoreSessionState)) { |
+ BrowserVector::const_iterator it; |
+ for (it = begin(); it != end(); ++it) { |
+ (*it)->profile()->SaveSessionState(); |
+ } |
+ } |
+ |
// Set the flag to restore state after the restart. |
PrefService* pref_service = g_browser_process->local_state(); |
pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true); |