| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 148 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
| 149 #include "chrome/browser/ui/apps/chrome_app_window_client.h" | 149 #include "chrome/browser/ui/apps/chrome_app_window_client.h" |
| 150 #include "components/storage_monitor/storage_monitor.h" | 150 #include "components/storage_monitor/storage_monitor.h" |
| 151 #include "extensions/common/extension_l10n_util.h" | 151 #include "extensions/common/extension_l10n_util.h" |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 #if !defined(DISABLE_NACL) | 154 #if !defined(DISABLE_NACL) |
| 155 #include "chrome/browser/component_updater/pnacl_component_installer.h" | 155 #include "chrome/browser/component_updater/pnacl_component_installer.h" |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 #if defined(ENABLE_PLUGIN_INSTALLATION) | 158 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
| 159 #include "chrome/browser/plugins/plugins_resource_service.h" | 159 #include "chrome/browser/plugins/plugins_resource_service.h" |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 #if defined(ENABLE_WEBRTC) | 162 #if defined(ENABLE_WEBRTC) |
| 163 #include "chrome/browser/media/webrtc/webrtc_log_uploader.h" | 163 #include "chrome/browser/media/webrtc/webrtc_log_uploader.h" |
| 164 #endif | 164 #endif |
| 165 | 165 |
| 166 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | 166 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
| 167 #include "chrome/browser/memory/tab_manager.h" | 167 #include "chrome/browser/memory/tab_manager.h" |
| 168 #endif | 168 #endif |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // NetworkTimeTracker, and SafeBrowsing ClientSideDetectionService | 300 // NetworkTimeTracker, and SafeBrowsing ClientSideDetectionService |
| 301 // (owned by the SafeBrowsingService) before the io_thread_ gets destroyed, | 301 // (owned by the SafeBrowsingService) before the io_thread_ gets destroyed, |
| 302 // since their destructors can call the URLFetcher destructor, which does a | 302 // since their destructors can call the URLFetcher destructor, which does a |
| 303 // PostDelayedTask operation on the IO thread. (The IO thread will handle | 303 // PostDelayedTask operation on the IO thread. (The IO thread will handle |
| 304 // that URLFetcher operation before going away.) | 304 // that URLFetcher operation before going away.) |
| 305 metrics_services_manager_.reset(); | 305 metrics_services_manager_.reset(); |
| 306 intranet_redirect_detector_.reset(); | 306 intranet_redirect_detector_.reset(); |
| 307 if (safe_browsing_service_.get()) | 307 if (safe_browsing_service_.get()) |
| 308 safe_browsing_service()->ShutDown(); | 308 safe_browsing_service()->ShutDown(); |
| 309 network_time_tracker_.reset(); | 309 network_time_tracker_.reset(); |
| 310 #if defined(ENABLE_PLUGIN_INSTALLATION) | 310 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
| 311 plugins_resource_service_.reset(); | 311 plugins_resource_service_.reset(); |
| 312 #endif | 312 #endif |
| 313 | 313 |
| 314 // Need to clear the desktop notification balloons before the io_thread_ and | 314 // Need to clear the desktop notification balloons before the io_thread_ and |
| 315 // before the profiles, since if there are any still showing we will access | 315 // before the profiles, since if there are any still showing we will access |
| 316 // those things during teardown. | 316 // those things during teardown. |
| 317 notification_ui_manager_.reset(); | 317 notification_ui_manager_.reset(); |
| 318 | 318 |
| 319 // The SupervisedUserWhitelistInstaller observes the ProfileAttributesStorage, | 319 // The SupervisedUserWhitelistInstaller observes the ProfileAttributesStorage, |
| 320 // so it needs to be shut down before the ProfileManager. | 320 // so it needs to be shut down before the ProfileManager. |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 ApplyMetricsReportingPolicy(); | 1075 ApplyMetricsReportingPolicy(); |
| 1076 #endif | 1076 #endif |
| 1077 | 1077 |
| 1078 #if defined(ENABLE_PLUGINS) | 1078 #if defined(ENABLE_PLUGINS) |
| 1079 PluginService* plugin_service = PluginService::GetInstance(); | 1079 PluginService* plugin_service = PluginService::GetInstance(); |
| 1080 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); | 1080 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); |
| 1081 | 1081 |
| 1082 // Triggers initialization of the singleton instance on UI thread. | 1082 // Triggers initialization of the singleton instance on UI thread. |
| 1083 PluginFinder::GetInstance()->Init(); | 1083 PluginFinder::GetInstance()->Init(); |
| 1084 | 1084 |
| 1085 #if defined(ENABLE_PLUGIN_INSTALLATION) | 1085 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
| 1086 DCHECK(!plugins_resource_service_.get()); | 1086 DCHECK(!plugins_resource_service_.get()); |
| 1087 plugins_resource_service_.reset(new PluginsResourceService(local_state())); | 1087 plugins_resource_service_.reset(new PluginsResourceService(local_state())); |
| 1088 plugins_resource_service_->Init(); | 1088 plugins_resource_service_->Init(); |
| 1089 #endif | 1089 #endif |
| 1090 #endif // defined(ENABLE_PLUGINS) | 1090 #endif // defined(ENABLE_PLUGINS) |
| 1091 | 1091 |
| 1092 #if !defined(OS_ANDROID) | 1092 #if !defined(OS_ANDROID) |
| 1093 storage_monitor::StorageMonitor::Create(); | 1093 storage_monitor::StorageMonitor::Create(); |
| 1094 #endif | 1094 #endif |
| 1095 | 1095 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 void BrowserProcessImpl::OnAutoupdateTimer() { | 1395 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1396 if (CanAutorestartForUpdate()) { | 1396 if (CanAutorestartForUpdate()) { |
| 1397 DLOG(WARNING) << "Detected update. Restarting browser."; | 1397 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1398 RestartBackgroundInstance(); | 1398 RestartBackgroundInstance(); |
| 1399 } | 1399 } |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1402 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |