OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 #include "content/public/common/content_switches.h" | 104 #include "content/public/common/content_switches.h" |
105 #include "extensions/common/constants.h" | 105 #include "extensions/common/constants.h" |
106 #include "net/socket/client_socket_pool_manager.h" | 106 #include "net/socket/client_socket_pool_manager.h" |
107 #include "net/url_request/url_request_context_getter.h" | 107 #include "net/url_request/url_request_context_getter.h" |
108 #include "ui/base/idle/idle.h" | 108 #include "ui/base/idle/idle.h" |
109 #include "ui/base/l10n/l10n_util.h" | 109 #include "ui/base/l10n/l10n_util.h" |
110 #include "ui/message_center/message_center.h" | 110 #include "ui/message_center/message_center.h" |
111 | 111 |
112 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
113 #include "base/win/windows_version.h" | 113 #include "base/win/windows_version.h" |
114 #include "chrome/common/prefetch_argument_win.h" | |
114 #include "ui/views/focus/view_storage.h" | 115 #include "ui/views/focus/view_storage.h" |
115 #elif defined(OS_MACOSX) | 116 #elif defined(OS_MACOSX) |
116 #include "chrome/browser/chrome_browser_main_mac.h" | 117 #include "chrome/browser/chrome_browser_main_mac.h" |
117 #endif | 118 #endif |
118 | 119 |
119 #if !defined(OS_ANDROID) | 120 #if !defined(OS_ANDROID) |
120 #include "chrome/browser/ui/user_manager.h" | 121 #include "chrome/browser/ui/user_manager.h" |
121 #include "components/gcm_driver/gcm_client_factory.h" | 122 #include "components/gcm_driver/gcm_client_factory.h" |
122 #include "components/gcm_driver/gcm_desktop_utils.h" | 123 #include "components/gcm_driver/gcm_desktop_utils.h" |
123 #endif | 124 #endif |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1264 | 1265 |
1265 // Ensure that our desired switches are set on the new process. | 1266 // Ensure that our desired switches are set on the new process. |
1266 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { | 1267 for (size_t i = 0; i < arraysize(kSwitchesToAddOnAutorestart); ++i) { |
1267 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) | 1268 if (!new_cl->HasSwitch(kSwitchesToAddOnAutorestart[i])) |
1268 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); | 1269 new_cl->AppendSwitch(kSwitchesToAddOnAutorestart[i]); |
1269 } | 1270 } |
1270 | 1271 |
1271 DLOG(WARNING) << "Shutting down current instance of the browser."; | 1272 DLOG(WARNING) << "Shutting down current instance of the browser."; |
1272 chrome::AttemptExit(); | 1273 chrome::AttemptExit(); |
1273 | 1274 |
1275 #if defined(OS_WIN) | |
1276 chrome::AddWindowsPrefetchArgument(new_cl.get()); | |
gab
2016/01/18 19:10:51
Move to line 1271 (i.e. where |new_cl| is being bu
| |
1277 #endif // defined(OS_WIN) | |
1278 | |
1274 // Transfer ownership to Upgrade. | 1279 // Transfer ownership to Upgrade. |
1275 upgrade_util::SetNewCommandLine(new_cl.release()); | 1280 upgrade_util::SetNewCommandLine(new_cl.release()); |
1276 } | 1281 } |
1277 | 1282 |
1278 void BrowserProcessImpl::OnAutoupdateTimer() { | 1283 void BrowserProcessImpl::OnAutoupdateTimer() { |
1279 if (CanAutorestartForUpdate()) { | 1284 if (CanAutorestartForUpdate()) { |
1280 DLOG(WARNING) << "Detected update. Restarting browser."; | 1285 DLOG(WARNING) << "Detected update. Restarting browser."; |
1281 RestartBackgroundInstance(); | 1286 RestartBackgroundInstance(); |
1282 } | 1287 } |
1283 } | 1288 } |
1284 | 1289 |
1285 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1290 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |