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