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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 } | 975 } |
976 } | 976 } |
977 | 977 |
978 // Ensure that our desired switches are set on the new process. | 978 // Ensure that our desired switches are set on the new process. |
979 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { | 979 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { |
980 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) | 980 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) |
981 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); | 981 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); |
982 } | 982 } |
983 | 983 |
984 DLOG(WARNING) << "Shutting down current instance of the browser."; | 984 DLOG(WARNING) << "Shutting down current instance of the browser."; |
985 BrowserList::AttemptExit(true); | 985 BrowserList::AttemptExit(); |
986 | 986 |
987 // Transfer ownership to Upgrade. | 987 // Transfer ownership to Upgrade. |
988 upgrade_util::SetNewCommandLine(new_cl.release()); | 988 upgrade_util::SetNewCommandLine(new_cl.release()); |
989 } | 989 } |
990 | 990 |
991 void BrowserProcessImpl::OnAutoupdateTimer() { | 991 void BrowserProcessImpl::OnAutoupdateTimer() { |
992 if (CanAutorestartForUpdate()) { | 992 if (CanAutorestartForUpdate()) { |
993 DLOG(WARNING) << "Detected update. Restarting browser."; | 993 DLOG(WARNING) << "Detected update. Restarting browser."; |
994 RestartBackgroundInstance(); | 994 RestartBackgroundInstance(); |
995 } | 995 } |
996 } | 996 } |
997 | 997 |
998 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 998 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |