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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 DCHECK(CalledOnValidThread()); | 487 DCHECK(CalledOnValidThread()); |
489 return clipboard_.get(); | 488 return clipboard_.get(); |
490 } | 489 } |
491 | 490 |
492 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { | 491 net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() { |
493 DCHECK(CalledOnValidThread()); | 492 DCHECK(CalledOnValidThread()); |
494 return io_thread()->system_url_request_context_getter(); | 493 return io_thread()->system_url_request_context_getter(); |
495 } | 494 } |
496 | 495 |
497 #if defined(OS_CHROMEOS) | 496 #if defined(OS_CHROMEOS) |
498 chromeos::ProxyConfigServiceImpl* | |
499 BrowserProcessImpl::chromeos_proxy_config_service_impl() { | |
500 DCHECK(CalledOnValidThread()); | |
501 if (!chromeos_proxy_config_service_impl_) { | |
502 chromeos_proxy_config_service_impl_ = | |
503 new chromeos::ProxyConfigServiceImpl(); | |
504 } | |
505 return chromeos_proxy_config_service_impl_; | |
506 } | |
507 | |
508 browser::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { | 497 browser::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() { |
509 DCHECK(CalledOnValidThread()); | 498 DCHECK(CalledOnValidThread()); |
510 if (!oom_priority_manager_.get()) | 499 if (!oom_priority_manager_.get()) |
511 oom_priority_manager_.reset(new browser::OomPriorityManager()); | 500 oom_priority_manager_.reset(new browser::OomPriorityManager()); |
512 return oom_priority_manager_.get(); | 501 return oom_priority_manager_.get(); |
513 } | 502 } |
514 #endif // defined(OS_CHROMEOS) | 503 #endif // defined(OS_CHROMEOS) |
515 | 504 |
516 ExtensionEventRouterForwarder* | 505 ExtensionEventRouterForwarder* |
517 BrowserProcessImpl::extension_event_router_forwarder() { | 506 BrowserProcessImpl::extension_event_router_forwarder() { |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 } | 1145 } |
1157 | 1146 |
1158 void BrowserProcessImpl::OnAutoupdateTimer() { | 1147 void BrowserProcessImpl::OnAutoupdateTimer() { |
1159 if (CanAutorestartForUpdate()) { | 1148 if (CanAutorestartForUpdate()) { |
1160 DLOG(WARNING) << "Detected update. Restarting browser."; | 1149 DLOG(WARNING) << "Detected update. Restarting browser."; |
1161 RestartPersistentInstance(); | 1150 RestartPersistentInstance(); |
1162 } | 1151 } |
1163 } | 1152 } |
1164 | 1153 |
1165 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1154 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |