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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 #include "content/public/browser/plugin_service.h" | 113 #include "content/public/browser/plugin_service.h" |
114 #include "content/public/browser/render_process_host.h" | 114 #include "content/public/browser/render_process_host.h" |
115 #include "content/public/browser/resource_dispatcher_host.h" | 115 #include "content/public/browser/resource_dispatcher_host.h" |
116 #include "content/public/browser/service_worker_context.h" | 116 #include "content/public/browser/service_worker_context.h" |
117 #include "content/public/browser/storage_partition.h" | 117 #include "content/public/browser/storage_partition.h" |
118 #include "content/public/common/content_switches.h" | 118 #include "content/public/common/content_switches.h" |
119 #include "extensions/common/constants.h" | 119 #include "extensions/common/constants.h" |
120 #include "extensions/features/features.h" | 120 #include "extensions/features/features.h" |
121 #include "net/socket/client_socket_pool_manager.h" | 121 #include "net/socket/client_socket_pool_manager.h" |
122 #include "net/url_request/url_request_context_getter.h" | 122 #include "net/url_request/url_request_context_getter.h" |
| 123 #include "ppapi/features/features.h" |
123 #include "printing/features/features.h" | 124 #include "printing/features/features.h" |
124 #include "ui/base/idle/idle.h" | 125 #include "ui/base/idle/idle.h" |
125 #include "ui/base/l10n/l10n_util.h" | 126 #include "ui/base/l10n/l10n_util.h" |
126 #include "ui/message_center/message_center.h" | 127 #include "ui/message_center/message_center.h" |
127 | 128 |
128 #if defined(OS_WIN) | 129 #if defined(OS_WIN) |
129 #include "base/win/windows_version.h" | 130 #include "base/win/windows_version.h" |
130 #include "ui/views/focus/view_storage.h" | 131 #include "ui/views/focus/view_storage.h" |
131 #elif defined(OS_MACOSX) | 132 #elif defined(OS_MACOSX) |
132 #include "chrome/browser/chrome_browser_main_mac.h" | 133 #include "chrome/browser/chrome_browser_main_mac.h" |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 // system request context is available for the fetchers. | 1076 // system request context is available for the fetchers. |
1076 browser_policy_connector()->Init(local_state(), system_request_context()); | 1077 browser_policy_connector()->Init(local_state(), system_request_context()); |
1077 | 1078 |
1078 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) | 1079 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) |
1079 ApplyDefaultBrowserPolicy(); | 1080 ApplyDefaultBrowserPolicy(); |
1080 | 1081 |
1081 #if !defined(OS_ANDROID) | 1082 #if !defined(OS_ANDROID) |
1082 ApplyMetricsReportingPolicy(); | 1083 ApplyMetricsReportingPolicy(); |
1083 #endif | 1084 #endif |
1084 | 1085 |
1085 #if defined(ENABLE_PLUGINS) | 1086 #if BUILDFLAG(ENABLE_PLUGINS) |
1086 PluginService* plugin_service = PluginService::GetInstance(); | 1087 PluginService* plugin_service = PluginService::GetInstance(); |
1087 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); | 1088 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); |
1088 | 1089 |
1089 // Triggers initialization of the singleton instance on UI thread. | 1090 // Triggers initialization of the singleton instance on UI thread. |
1090 PluginFinder::GetInstance()->Init(); | 1091 PluginFinder::GetInstance()->Init(); |
1091 | 1092 |
1092 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) | 1093 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
1093 DCHECK(!plugins_resource_service_.get()); | 1094 DCHECK(!plugins_resource_service_.get()); |
1094 plugins_resource_service_.reset(new PluginsResourceService(local_state())); | 1095 plugins_resource_service_.reset(new PluginsResourceService(local_state())); |
1095 plugins_resource_service_->Init(); | 1096 plugins_resource_service_->Init(); |
1096 #endif | 1097 #endif |
1097 #endif // defined(ENABLE_PLUGINS) | 1098 #endif // BUILDFLAG(ENABLE_PLUGINS) |
1098 | 1099 |
1099 #if !defined(OS_ANDROID) | 1100 #if !defined(OS_ANDROID) |
1100 storage_monitor::StorageMonitor::Create(); | 1101 storage_monitor::StorageMonitor::Create(); |
1101 #endif | 1102 #endif |
1102 | 1103 |
1103 child_process_watcher_.reset(new ChromeChildProcessWatcher()); | 1104 child_process_watcher_.reset(new ChromeChildProcessWatcher()); |
1104 | 1105 |
1105 CacheDefaultWebClientState(); | 1106 CacheDefaultWebClientState(); |
1106 | 1107 |
1107 platform_part_->PreMainMessageLoopRun(); | 1108 platform_part_->PreMainMessageLoopRun(); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 } | 1401 } |
1401 | 1402 |
1402 void BrowserProcessImpl::OnAutoupdateTimer() { | 1403 void BrowserProcessImpl::OnAutoupdateTimer() { |
1403 if (CanAutorestartForUpdate()) { | 1404 if (CanAutorestartForUpdate()) { |
1404 DLOG(WARNING) << "Detected update. Restarting browser."; | 1405 DLOG(WARNING) << "Detected update. Restarting browser."; |
1405 RestartBackgroundInstance(); | 1406 RestartBackgroundInstance(); |
1406 } | 1407 } |
1407 } | 1408 } |
1408 | 1409 |
1409 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1410 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |