OLD | NEW |
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 Loading... |
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) |
OLD | NEW |