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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 8745015: Store the "browser autorestarted, last session must be restored" information in a preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix (browser_tests). Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 } 976 }
977 } 977 }
978 978
979 // Ensure that our desired switches are set on the new process. 979 // Ensure that our desired switches are set on the new process.
980 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { 980 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) {
981 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) 981 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i]))
982 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); 982 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]);
983 } 983 }
984 984
985 DLOG(WARNING) << "Shutting down current instance of the browser."; 985 DLOG(WARNING) << "Shutting down current instance of the browser.";
986 BrowserList::AttemptExit(); 986 BrowserList::AttemptExit(true);
987 987
988 // Transfer ownership to Upgrade. 988 // Transfer ownership to Upgrade.
989 upgrade_util::SetNewCommandLine(new_cl.release()); 989 upgrade_util::SetNewCommandLine(new_cl.release());
990 } 990 }
991 991
992 void BrowserProcessImpl::OnAutoupdateTimer() { 992 void BrowserProcessImpl::OnAutoupdateTimer() {
993 if (CanAutorestartForUpdate()) { 993 if (CanAutorestartForUpdate()) {
994 DLOG(WARNING) << "Detected update. Restarting browser."; 994 DLOG(WARNING) << "Detected update. Restarting browser.";
995 RestartBackgroundInstance(); 995 RestartBackgroundInstance();
996 } 996 }
997 } 997 }
998 998
999 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 999 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/browser_shutdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698