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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 #include "ui/base/clipboard/clipboard.h" | 87 #include "ui/base/clipboard/clipboard.h" |
88 #include "ui/base/l10n/l10n_util.h" | 88 #include "ui/base/l10n/l10n_util.h" |
89 | 89 |
90 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
91 #include "ui/views/focus/view_storage.h" | 91 #include "ui/views/focus/view_storage.h" |
92 #elif defined(OS_MACOSX) | 92 #elif defined(OS_MACOSX) |
93 #include "chrome/browser/chrome_browser_main_mac.h" | 93 #include "chrome/browser/chrome_browser_main_mac.h" |
94 #endif | 94 #endif |
95 | 95 |
96 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
97 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | |
98 #include "chrome/browser/oom_priority_manager.h" | 97 #include "chrome/browser/oom_priority_manager.h" |
99 #endif // defined(OS_CHROMEOS) | 98 #endif // defined(OS_CHROMEOS) |
100 | 99 |
101 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 100 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
102 // How often to check if the persistent instance of Chrome needs to restart | 101 // How often to check if the persistent instance of Chrome needs to restart |
103 // to install an update. | 102 // to install an update. |
104 static const int kUpdateCheckIntervalHours = 6; | 103 static const int kUpdateCheckIntervalHours = 6; |
105 #endif | 104 #endif |
106 | 105 |
107 #if defined(OS_WIN) | 106 #if defined(OS_WIN) |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 default: | 251 default: |
253 break; | 252 break; |
254 } | 253 } |
255 } | 254 } |
256 | 255 |
257 void BrowserProcessImpl::PostStartThread(BrowserThread::ID thread_id) { | 256 void BrowserProcessImpl::PostStartThread(BrowserThread::ID thread_id) { |
258 } | 257 } |
259 | 258 |
260 void BrowserProcessImpl::PreStopThread(BrowserThread::ID thread_id) { | 259 void BrowserProcessImpl::PreStopThread(BrowserThread::ID thread_id) { |
261 switch (thread_id) { | 260 switch (thread_id) { |
262 #if defined(OS_CHROMEOS) | |
263 case BrowserThread::WEB_SOCKET_PROXY: | |
264 chromeos::WebSocketProxyController::Shutdown(); | |
265 break; | |
266 #endif | |
267 case BrowserThread::FILE: | 261 case BrowserThread::FILE: |
268 // Clean up state that lives on or uses the file_thread_ before | 262 // Clean up state that lives on or uses the file_thread_ before |
269 // it goes away. | 263 // it goes away. |
270 if (resource_dispatcher_host_.get()) { | 264 if (resource_dispatcher_host_.get()) { |
271 resource_dispatcher_host()->download_file_manager()->Shutdown(); | 265 resource_dispatcher_host()->download_file_manager()->Shutdown(); |
272 resource_dispatcher_host()->save_file_manager()->Shutdown(); | 266 resource_dispatcher_host()->save_file_manager()->Shutdown(); |
273 } | 267 } |
274 break; | 268 break; |
275 case BrowserThread::WEBKIT_DEPRECATED: | 269 case BrowserThread::WEBKIT_DEPRECATED: |
276 // Need to destroy ResourceDispatcherHost before PluginService | 270 // Need to destroy ResourceDispatcherHost before PluginService |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 } | 984 } |
991 | 985 |
992 void BrowserProcessImpl::OnAutoupdateTimer() { | 986 void BrowserProcessImpl::OnAutoupdateTimer() { |
993 if (CanAutorestartForUpdate()) { | 987 if (CanAutorestartForUpdate()) { |
994 DLOG(WARNING) << "Detected update. Restarting browser."; | 988 DLOG(WARNING) << "Detected update. Restarting browser."; |
995 RestartBackgroundInstance(); | 989 RestartBackgroundInstance(); |
996 } | 990 } |
997 } | 991 } |
998 | 992 |
999 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 993 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |