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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 } | 994 } |
995 } | 995 } |
996 | 996 |
997 // Ensure that our desired switches are set on the new process. | 997 // Ensure that our desired switches are set on the new process. |
998 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { | 998 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { |
999 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) | 999 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) |
1000 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); | 1000 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); |
1001 } | 1001 } |
1002 | 1002 |
1003 DLOG(WARNING) << "Shutting down current instance of the browser."; | 1003 DLOG(WARNING) << "Shutting down current instance of the browser."; |
1004 BrowserList::AttemptExit(); | 1004 BrowserList::AttemptExit(true); |
1005 | 1005 |
1006 // Transfer ownership to Upgrade. | 1006 // Transfer ownership to Upgrade. |
1007 upgrade_util::SetNewCommandLine(new_cl.release()); | 1007 upgrade_util::SetNewCommandLine(new_cl.release()); |
1008 } | 1008 } |
1009 | 1009 |
1010 void BrowserProcessImpl::OnAutoupdateTimer() { | 1010 void BrowserProcessImpl::OnAutoupdateTimer() { |
1011 if (CanAutorestartForUpdate()) { | 1011 if (CanAutorestartForUpdate()) { |
1012 DLOG(WARNING) << "Detected update. Restarting browser."; | 1012 DLOG(WARNING) << "Detected update. Restarting browser."; |
1013 RestartBackgroundInstance(); | 1013 RestartBackgroundInstance(); |
1014 } | 1014 } |
1015 } | 1015 } |
1016 | 1016 |
1017 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1017 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |