| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 #include "views/focus/view_storage.h" | 96 #include "views/focus/view_storage.h" |
| 97 #elif defined(OS_MACOSX) | 97 #elif defined(OS_MACOSX) |
| 98 #include "chrome/browser/chrome_browser_main_mac.h" | 98 #include "chrome/browser/chrome_browser_main_mac.h" |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 #if defined(IPC_MESSAGE_LOG_ENABLED) | 101 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 102 #include "content/common/child_process_messages.h" | 102 #include "content/common/child_process_messages.h" |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
| 106 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | |
| 107 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 106 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
| 108 #include "chrome/browser/oom_priority_manager.h" | 107 #include "chrome/browser/oom_priority_manager.h" |
| 109 #endif // defined(OS_CHROMEOS) | 108 #endif // defined(OS_CHROMEOS) |
| 110 | 109 |
| 111 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 110 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 112 // How often to check if the persistent instance of Chrome needs to restart | 111 // How often to check if the persistent instance of Chrome needs to restart |
| 113 // to install an update. | 112 // to install an update. |
| 114 static const int kUpdateCheckIntervalHours = 6; | 113 static const int kUpdateCheckIntervalHours = 6; |
| 115 #endif | 114 #endif |
| 116 | 115 |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 DCHECK(CalledOnValidThread()); | 490 DCHECK(CalledOnValidThread()); |
| 492 return clipboard_.get(); | 491 return clipboard_.get(); |
| 493 } | 492 } |
| 494 | 493 |
| 495 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { | 494 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { |
| 496 DCHECK(CalledOnValidThread()); | 495 DCHECK(CalledOnValidThread()); |
| 497 return io_thread()->system_url_request_context_getter(); | 496 return io_thread()->system_url_request_context_getter(); |
| 498 } | 497 } |
| 499 | 498 |
| 500 #if defined(OS_CHROMEOS) | 499 #if defined(OS_CHROMEOS) |
| 501 chromeos::ProxyConfigServiceImpl* | |
| 502 BrowserProcessImpl::chromeos_proxy_config_service_impl() { | |
| 503 DCHECK(CalledOnValidThread()); | |
| 504 if (!chromeos_proxy_config_service_impl_) { | |
| 505 chromeos_proxy_config_service_impl_ = | |
| 506 new chromeos::ProxyConfigServiceImpl(); | |
| 507 } | |
| 508 return chromeos_proxy_config_service_impl_; | |
| 509 } | |
| 510 | |
| 511 browser::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { | 500 browser::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { |
| 512 DCHECK(CalledOnValidThread()); | 501 DCHECK(CalledOnValidThread()); |
| 513 if (!oom_priority_manager_.get()) | 502 if (!oom_priority_manager_.get()) |
| 514 oom_priority_manager_.reset(new browser::OomPriorityManager()); | 503 oom_priority_manager_.reset(new browser::OomPriorityManager()); |
| 515 return oom_priority_manager_.get(); | 504 return oom_priority_manager_.get(); |
| 516 } | 505 } |
| 517 #endif // defined(OS_CHROMEOS) | 506 #endif // defined(OS_CHROMEOS) |
| 518 | 507 |
| 519 ExtensionEventRouterForwarder* | 508 ExtensionEventRouterForwarder* |
| 520 BrowserProcessImpl::extension_event_router_forwarder() { | 509 BrowserProcessImpl::extension_event_router_forwarder() { |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 } | 1154 } |
| 1166 | 1155 |
| 1167 void BrowserProcessImpl::OnAutoupdateTimer() { | 1156 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1168 if (CanAutorestartForUpdate()) { | 1157 if (CanAutorestartForUpdate()) { |
| 1169 DLOG(WARNING) << "Detected update. Restarting browser."; | 1158 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1170 RestartBackgroundInstance(); | 1159 RestartBackgroundInstance(); |
| 1171 } | 1160 } |
| 1172 } | 1161 } |
| 1173 | 1162 |
| 1174 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1163 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |