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

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

Issue 8907025: Merge 114213 - Fixes for the kWasRestarted pref. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } 979 }
980 } 980 }
981 981
982 // Ensure that our desired switches are set on the new process. 982 // Ensure that our desired switches are set on the new process.
983 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { 983 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) {
984 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) 984 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i]))
985 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); 985 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]);
986 } 986 }
987 987
988 DLOG(WARNING) << "Shutting down current instance of the browser."; 988 DLOG(WARNING) << "Shutting down current instance of the browser.";
989 BrowserList::AttemptExit(true); 989 BrowserList::AttemptExit();
990 990
991 // Transfer ownership to Upgrade. 991 // Transfer ownership to Upgrade.
992 upgrade_util::SetNewCommandLine(new_cl.release()); 992 upgrade_util::SetNewCommandLine(new_cl.release());
993 } 993 }
994 994
995 void BrowserProcessImpl::OnAutoupdateTimer() { 995 void BrowserProcessImpl::OnAutoupdateTimer() {
996 if (CanAutorestartForUpdate()) { 996 if (CanAutorestartForUpdate()) {
997 DLOG(WARNING) << "Detected update. Restarting browser."; 997 DLOG(WARNING) << "Detected update. Restarting browser.";
998 RestartBackgroundInstance(); 998 RestartBackgroundInstance();
999 } 999 }
1000 } 1000 }
1001 1001
1002 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1002 #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/chrome_browser_main_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698