| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/prefs/pref_registry_simple.h" | 21 #include "base/prefs/pref_registry_simple.h" |
| 22 #include "base/prefs/pref_service.h" | 22 #include "base/prefs/pref_service.h" |
| 23 #include "base/synchronization/waitable_event.h" | 23 #include "base/synchronization/waitable_event.h" |
| 24 #include "base/threading/thread.h" | 24 #include "base/threading/thread.h" |
| 25 #include "base/threading/thread_restrictions.h" | 25 #include "base/threading/thread_restrictions.h" |
| 26 #include "base/time/default_tick_clock.h" | 26 #include "base/time/default_tick_clock.h" |
| 27 #include "chrome/browser/background/background_mode_manager.h" | 27 #include "chrome/browser/background/background_mode_manager.h" |
| 28 #include "chrome/browser/chrome_browser_main.h" | 28 #include "chrome/browser/chrome_browser_main.h" |
| 29 #include "chrome/browser/chrome_content_browser_client.h" | 29 #include "chrome/browser/chrome_content_browser_client.h" |
| 30 #include "chrome/browser/chrome_notification_types.h" | 30 #include "chrome/browser/chrome_notification_types.h" |
| 31 #include "chrome/browser/component_updater/chrome_component_updater_configurator
.h" | 31 #include "chrome/browser/component_updater/component_updater_configurator.h" |
| 32 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 32 #include "chrome/browser/component_updater/component_updater_service.h" |
| 33 #include "chrome/browser/defaults.h" | 33 #include "chrome/browser/defaults.h" |
| 34 #include "chrome/browser/devtools/remote_debugging_server.h" | 34 #include "chrome/browser/devtools/remote_debugging_server.h" |
| 35 #include "chrome/browser/download/download_request_limiter.h" | 35 #include "chrome/browser/download/download_request_limiter.h" |
| 36 #include "chrome/browser/download/download_status_updater.h" | 36 #include "chrome/browser/download/download_status_updater.h" |
| 37 #include "chrome/browser/first_run/upgrade_util.h" | 37 #include "chrome/browser/first_run/upgrade_util.h" |
| 38 #include "chrome/browser/gpu/gl_string_manager.h" | 38 #include "chrome/browser/gpu/gl_string_manager.h" |
| 39 #include "chrome/browser/gpu/gpu_mode_manager.h" | 39 #include "chrome/browser/gpu/gpu_mode_manager.h" |
| 40 #include "chrome/browser/icon_manager.h" | 40 #include "chrome/browser/icon_manager.h" |
| 41 #include "chrome/browser/idle.h" | 41 #include "chrome/browser/idle.h" |
| 42 #include "chrome/browser/intranet_redirect_detector.h" | 42 #include "chrome/browser/intranet_redirect_detector.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 122 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
| 123 | 123 |
| 124 #if defined(ENABLE_EXTENSIONS) | 124 #if defined(ENABLE_EXTENSIONS) |
| 125 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" | 125 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 126 #include "chrome/browser/extensions/event_router_forwarder.h" | 126 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 127 #include "chrome/browser/extensions/extension_renderer_state.h" | 127 #include "chrome/browser/extensions/extension_renderer_state.h" |
| 128 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 128 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
| 129 #include "components/storage_monitor/storage_monitor.h" | 129 #include "components/storage_monitor/storage_monitor.h" |
| 130 #endif | 130 #endif |
| 131 | 131 |
| 132 #if !defined(DISABLE_NACL) |
| 133 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
| 134 #endif |
| 135 |
| 132 #if defined(ENABLE_PLUGIN_INSTALLATION) | 136 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 133 #include "chrome/browser/plugins/plugins_resource_service.h" | 137 #include "chrome/browser/plugins/plugins_resource_service.h" |
| 134 #endif | 138 #endif |
| 135 | 139 |
| 136 #if defined(ENABLE_WEBRTC) | 140 #if defined(ENABLE_WEBRTC) |
| 137 #include "chrome/browser/media/webrtc_log_uploader.h" | 141 #include "chrome/browser/media/webrtc_log_uploader.h" |
| 138 #endif | 142 #endif |
| 139 | 143 |
| 140 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 144 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 141 // How often to check if the persistent instance of Chrome needs to restart | 145 // How often to check if the persistent instance of Chrome needs to restart |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 } | 898 } |
| 895 | 899 |
| 896 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { | 900 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { |
| 897 if (!crl_set_fetcher_.get()) | 901 if (!crl_set_fetcher_.get()) |
| 898 crl_set_fetcher_ = new CRLSetFetcher(); | 902 crl_set_fetcher_ = new CRLSetFetcher(); |
| 899 return crl_set_fetcher_.get(); | 903 return crl_set_fetcher_.get(); |
| 900 } | 904 } |
| 901 | 905 |
| 902 component_updater::PnaclComponentInstaller* | 906 component_updater::PnaclComponentInstaller* |
| 903 BrowserProcessImpl::pnacl_component_installer() { | 907 BrowserProcessImpl::pnacl_component_installer() { |
| 908 #if !defined(DISABLE_NACL) |
| 904 if (!pnacl_component_installer_.get()) { | 909 if (!pnacl_component_installer_.get()) { |
| 905 pnacl_component_installer_.reset( | 910 pnacl_component_installer_.reset( |
| 906 new component_updater::PnaclComponentInstaller()); | 911 new component_updater::PnaclComponentInstaller()); |
| 907 } | 912 } |
| 908 return pnacl_component_installer_.get(); | 913 return pnacl_component_installer_.get(); |
| 914 #else |
| 915 return NULL; |
| 916 #endif |
| 909 } | 917 } |
| 910 | 918 |
| 911 void BrowserProcessImpl::ResourceDispatcherHostCreated() { | 919 void BrowserProcessImpl::ResourceDispatcherHostCreated() { |
| 912 resource_dispatcher_host_delegate_.reset( | 920 resource_dispatcher_host_delegate_.reset( |
| 913 new ChromeResourceDispatcherHostDelegate(prerender_tracker())); | 921 new ChromeResourceDispatcherHostDelegate(prerender_tracker())); |
| 914 ResourceDispatcherHost::Get()->SetDelegate( | 922 ResourceDispatcherHost::Get()->SetDelegate( |
| 915 resource_dispatcher_host_delegate_.get()); | 923 resource_dispatcher_host_delegate_.get()); |
| 916 | 924 |
| 917 pref_change_registrar_.Add( | 925 pref_change_registrar_.Add( |
| 918 prefs::kAllowCrossOriginAuthPrompt, | 926 prefs::kAllowCrossOriginAuthPrompt, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 } | 1213 } |
| 1206 | 1214 |
| 1207 void BrowserProcessImpl::OnAutoupdateTimer() { | 1215 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1208 if (CanAutorestartForUpdate()) { | 1216 if (CanAutorestartForUpdate()) { |
| 1209 DLOG(WARNING) << "Detected update. Restarting browser."; | 1217 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1210 RestartBackgroundInstance(); | 1218 RestartBackgroundInstance(); |
| 1211 } | 1219 } |
| 1212 } | 1220 } |
| 1213 | 1221 |
| 1214 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1222 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |