blob: 37e93cc1b3f8e6eb6df5ef810301e4797feafc08 [file] [log] [blame]
[email protected]3a80ea332012-01-09 19:53:291// Copyright (c) 2012 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
5// When each service is created, we set a flag indicating this. At this point,
6// the service initialization could fail or succeed. This allows us to remember
7// if we tried to create a service, and not try creating it over and over if
8// the creation failed.
9
[email protected]58dca552009-06-17 00:35:0210#ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
11#define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
initial.commit09911bf2008-07-26 23:55:2912
avie4d7b6f2015-12-26 00:59:1813#include <stdint.h>
14
dcheng4af48582016-04-19 00:29:3515#include <memory>
initial.commit09911bf2008-07-26 23:55:2916#include <string>
17
[email protected]6b4e6852012-02-14 04:02:4818#include "base/debug/stack_trace.h"
avie4d7b6f2015-12-26 00:59:1819#include "base/macros.h"
[email protected]80745e32012-05-08 01:22:1220#include "base/memory/ref_counted.h"
gab25894fe2017-05-30 03:40:3621#include "base/sequence_checker.h"
[email protected]4dcb7972013-06-28 15:15:4122#include "base/timer/timer.h"
avie4d7b6f2015-12-26 00:59:1823#include "build/build_config.h"
initial.commit09911bf2008-07-26 23:55:2924#include "chrome/browser/browser_process.h"
Scott Violet6200d332018-02-23 21:29:2325#include "chrome/common/buildflags.h"
Michael Giuffrida2dbce0d12017-09-02 03:30:5926#include "components/keep_alive_registry/keep_alive_state_observer.h"
Scott Violet9ae82892018-03-01 18:38:1227#include "components/nacl/common/buildflags.h"
brettwb1fc1b82016-02-02 00:19:0828#include "components/prefs/pref_change_registrar.h"
Scott Violetc8240b02018-03-08 22:03:5929#include "extensions/buildflags/buildflags.h"
Scott Violeta35f9a42018-03-22 22:00:4430#include "media/media_buildflags.h"
Scott Violet02e38b92018-03-27 23:42:1431#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:1932#include "printing/buildflags/buildflags.h"
Ken Rockot54311e62018-02-10 19:01:5233#include "services/network/public/mojom/network_service.mojom.h"
[email protected]b112a4c2009-02-01 20:24:0134
wfh22e2f4a22015-04-28 22:39:2135class ChromeChildProcessWatcher;
reillyge471fab2014-08-29 01:58:4336class ChromeDeviceClient;
Scott Violet875789e2018-02-02 07:46:4837class ChromeMetricsServicesManagerClient;
[email protected]8bcdf072011-06-03 16:52:1538class ChromeResourceDispatcherHostDelegate;
dgozman54cc54e2016-02-23 03:47:3039class DevToolsAutoOpener;
[email protected]4475d232011-07-27 15:29:2040class RemoteDebuggingServer;
[email protected]b1de2c72013-02-06 02:45:4741class PrefRegistrySimple;
initial.commit09911bf2008-07-26 23:55:2942
bauerbecab4f52017-03-13 20:16:4143#if BUILDFLAG(ENABLE_PLUGINS)
[email protected]2366a3a2012-10-02 20:41:1444class PluginsResourceService;
45#endif
46
Elad Alon7264d6a2018-03-21 15:06:2647#if BUILDFLAG(ENABLE_WEBRTC)
48class WebRtcEventLogManager;
49#endif
50
[email protected]0de615a2012-11-08 04:40:5951namespace base {
[email protected]2f3b1cc2014-03-17 23:07:1552class CommandLine;
[email protected]0de615a2012-11-08 04:40:5953class SequencedTaskRunner;
54}
55
[email protected]aa3dd492013-11-05 17:09:0956namespace extensions {
57class ExtensionsBrowserClient;
58}
59
[email protected]c027d6d2014-06-05 15:25:4060namespace gcm {
61class GCMDriver;
62}
63
drogerc690e8802015-09-21 14:29:1664namespace net_log {
65class ChromeNetLog;
66}
67
[email protected]5b869962011-09-20 19:49:3368namespace policy {
Scott Violetfdd6f352018-01-12 19:12:2969class ChromeBrowserPolicyConnector;
[email protected]a4179c2a2012-02-09 18:14:2170class PolicyService;
Scott Violetfdd6f352018-01-12 19:12:2971} // namespace policy
[email protected]fcf53572011-06-29 15:44:3772
Francois Doraya271a5c2018-04-03 18:37:1173namespace resource_coordinator {
74class TabLifecycleUnitSource;
75}
76
initial.commit09911bf2008-07-26 23:55:2977// Real implementation of BrowserProcess that creates and returns the services.
[email protected]6618d1d2010-12-15 21:18:4778class BrowserProcessImpl : public BrowserProcess,
dgnfe075c82016-03-18 11:25:3579 public KeepAliveStateObserver {
initial.commit09911bf2008-07-26 23:55:2980 public:
[email protected]0de615a2012-11-08 04:40:5981 // |local_state_task_runner| must be a shutdown-blocking task runner.
Bernhard Bauer5533f9912017-11-06 17:56:0282 explicit BrowserProcessImpl(
83 base::SequencedTaskRunner* local_state_task_runner);
Daniel Chenga542fca2014-10-21 09:51:2984 ~BrowserProcessImpl() override;
initial.commit09911bf2008-07-26 23:55:2985
Scott Violet875789e2018-02-02 07:46:4886 // Called to complete initialization.
87 void Init();
88
[email protected]99907362012-01-11 05:41:4089 // Called before the browser threads are created.
Bernhard Bauer5533f9912017-11-06 17:56:0290 void PreCreateThreads(const base::CommandLine& command_line);
[email protected]2e5b60a22011-11-28 15:56:4191
[email protected]d2caaa22011-12-12 03:04:1592 // Called after the threads have been created but before the message loops
93 // starts running. Allows the browser process to do any initialization that
94 // requires all threads running.
95 void PreMainMessageLoopRun();
96
[email protected]2e5b60a22011-11-28 15:56:4197 // Most cleanup is done by these functions, driven from
98 // ChromeBrowserMain based on notifications from the content
99 // framework, rather than in the destructor, so that we can
100 // interleave cleanup with threads being stopped.
thestigd75ce5532015-10-05 22:08:34101#if !defined(OS_ANDROID)
[email protected]2e5b60a22011-11-28 15:56:41102 void StartTearDown();
[email protected]99907362012-01-11 05:41:40103 void PostDestroyThreads();
thestigd75ce5532015-10-05 22:08:34104#endif
[email protected]2e5b60a22011-11-28 15:56:41105
[email protected]80745e32012-05-08 01:22:12106 // BrowserProcess implementation.
Daniel Chenga542fca2014-10-21 09:51:29107 void ResourceDispatcherHostCreated() override;
108 void EndSession() override;
Gabriel Charetteb1af7ffb2017-07-27 06:10:35109 void FlushLocalStateAndReply(base::OnceClosure reply) override;
blundell695d61f2015-10-21 11:25:53110 metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
111 override;
Daniel Chenga542fca2014-10-21 09:51:29112 metrics::MetricsService* metrics_service() override;
nzolghadrd87a308d2016-12-07 15:45:56113 rappor::RapporServiceImpl* rappor_service() override;
Daniel Chenga542fca2014-10-21 09:51:29114 IOThread* io_thread() override;
Matt Menke21b9cc62017-08-23 15:45:45115 SystemNetworkContextManager* system_network_context_manager() override;
Helen Li72c87ae42017-11-06 18:31:56116 content::NetworkConnectionTracker* network_connection_tracker() override;
Daniel Chenga542fca2014-10-21 09:51:29117 WatchDogThread* watchdog_thread() override;
118 ProfileManager* profile_manager() override;
119 PrefService* local_state() override;
120 net::URLRequestContextGetter* system_request_context() override;
blundell57bcfed2015-09-04 08:44:45121 variations::VariationsService* variations_service() override;
Daniel Chenga542fca2014-10-21 09:51:29122 BrowserProcessPlatformPart* platform_part() override;
123 extensions::EventRouterForwarder* extension_event_router_forwarder() override;
124 NotificationUIManager* notification_ui_manager() override;
miguelg23cd2dd72016-04-21 15:24:03125 NotificationPlatformBridge* notification_platform_bridge() override;
Scott Violetfdd6f352018-01-12 19:12:29126 policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
Daniel Chenga542fca2014-10-21 09:51:29127 policy::PolicyService* policy_service() override;
128 IconManager* icon_manager() override;
Daniel Chenga542fca2014-10-21 09:51:29129 GpuModeManager* gpu_mode_manager() override;
Pavel Feldmanc9ae59c2018-02-13 16:15:15130 void CreateDevToolsProtocolHandler() override;
dgozman54cc54e2016-02-23 03:47:30131 void CreateDevToolsAutoOpener() override;
Daniel Chenga542fca2014-10-21 09:51:29132 bool IsShuttingDown() override;
133 printing::PrintJobManager* print_job_manager() override;
134 printing::PrintPreviewDialogController* print_preview_dialog_controller()
135 override;
136 printing::BackgroundPrintingManager* background_printing_manager() override;
137 IntranetRedirectDetector* intranet_redirect_detector() override;
138 const std::string& GetApplicationLocale() override;
139 void SetApplicationLocale(const std::string& locale) override;
140 DownloadStatusUpdater* download_status_updater() override;
141 DownloadRequestLimiter* download_request_limiter() override;
142 BackgroundModeManager* background_mode_manager() override;
143 void set_background_mode_manager_for_test(
dcheng4af48582016-04-19 00:29:35144 std::unique_ptr<BackgroundModeManager> manager) override;
Daniel Chenga542fca2014-10-21 09:51:29145 StatusTray* status_tray() override;
vakh9a474d832015-11-13 01:43:09146 safe_browsing::SafeBrowsingService* safe_browsing_service() override;
Daniel Chenga542fca2014-10-21 09:51:29147 safe_browsing::ClientSideDetectionService* safe_browsing_detection_service()
148 override;
csharrison8a923d62017-03-10 15:42:13149 subresource_filter::ContentRulesetService*
150 subresource_filter_ruleset_service() override;
Sophie Changf453c0522017-11-03 06:33:49151 optimization_guide::OptimizationGuideService* optimization_guide_service()
152 override;
[email protected]6641bf662009-08-21 00:34:09153
Michael Giuffridadc8030c2017-08-02 13:22:44154#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
dchenge1bc7982014-10-30 00:32:40155 void StartAutoupdateTimer() override;
[email protected]3cdacd42010-04-30 18:55:53156#endif
[email protected]bd48c2b02010-04-09 20:32:42157
drogerc690e8802015-09-21 14:29:16158 net_log::ChromeNetLog* net_log() override;
Daniel Chenga542fca2014-10-21 09:51:29159 component_updater::ComponentUpdateService* component_updater() override;
bauerb22951c32015-02-12 13:18:17160 component_updater::SupervisedUserWhitelistInstaller*
161 supervised_user_whitelist_installer() override;
Daniel Chenga542fca2014-10-21 09:51:29162 MediaFileSystemRegistry* media_file_system_registry() override;
Brett Wilson0748bf412016-11-22 17:55:46163#if BUILDFLAG(ENABLE_WEBRTC)
Daniel Chenga542fca2014-10-21 09:51:29164 WebRtcLogUploader* webrtc_log_uploader() override;
[email protected]bbf32c52013-06-03 14:05:52165#endif
Daniel Chenga542fca2014-10-21 09:51:29166 network_time::NetworkTimeTracker* network_time_tracker() override;
167 gcm::GCMDriver* gcm_driver() override;
lpyfedf65a2017-06-01 01:41:24168 resource_coordinator::TabManager* GetTabManager() override;
pmonette9fa59e882016-02-10 00:12:19169 shell_integration::DefaultWebClientState CachedDefaultWebClientState()
grtf14398c2015-07-14 15:11:44170 override;
Sam McNallye36abbc2017-07-20 01:04:28171 prefs::InProcessPrefServiceFactory* pref_service_factory() const override;
[email protected]ca167a32011-09-30 15:19:11172
[email protected]b1de2c72013-02-06 02:45:47173 static void RegisterPrefs(PrefRegistrySimple* registry);
174
initial.commit09911bf2008-07-26 23:55:29175 private:
dgnfe075c82016-03-18 11:25:35176 // KeepAliveStateObserver implementation
177 void OnKeepAliveStateChanged(bool is_keeping_alive) override;
178 void OnKeepAliveRestartStateChanged(bool can_restart) override;
179
[email protected]0b565182011-03-02 18:11:15180 void CreateWatchdogThread();
initial.commit09911bf2008-07-26 23:55:29181 void CreateProfileManager();
initial.commit09911bf2008-07-26 23:55:29182 void CreateLocalState();
initial.commit09911bf2008-07-26 23:55:29183 void CreateIconManager();
[email protected]c4ff4952010-01-08 19:12:47184 void CreateIntranetRedirectDetector();
miguelg23cd2dd72016-04-21 15:24:03185 void CreateNotificationPlatformBridge();
[email protected]29672ab2009-10-30 03:44:03186 void CreateNotificationUIManager();
[email protected]d8ce31e2012-12-19 05:09:21187 void CreatePrintPreviewDialogController();
[email protected]68f88b992011-05-07 02:01:39188 void CreateBackgroundPrintingManager();
[email protected]462a0ff2011-06-02 17:15:34189 void CreateSafeBrowsingService();
engedyc5ef21ad2016-06-17 20:22:27190 void CreateSubresourceFilterRulesetService();
Sophie Changf453c0522017-11-03 06:33:49191 void CreateOptimizationGuideService();
[email protected]9e7f015f2011-05-28 00:24:25192 void CreateStatusTray();
193 void CreateBackgroundModeManager();
[email protected]c027d6d2014-06-05 15:25:40194 void CreateGCMDriver();
mattreynoldsf1aab392016-10-07 00:17:07195 void CreatePhysicalWebDataSource();
[email protected]a7a5e992010-12-09 23:39:51196
[email protected]40850a52011-05-26 22:07:35197 void ApplyAllowCrossOriginAuthPromptPolicy();
[email protected]b61f62a2011-11-01 02:02:10198 void ApplyDefaultBrowserPolicy();
Lei Zhang4736dd22017-07-07 01:38:17199#if !defined(OS_ANDROID)
[email protected]459158c2013-11-14 00:25:15200 void ApplyMetricsReportingPolicy();
Lei Zhang4736dd22017-07-07 01:38:17201#endif
[email protected]419a0572011-04-18 22:21:46202
grtf14398c2015-07-14 15:11:44203 void CacheDefaultWebClientState();
204
dgnfe075c82016-03-18 11:25:35205 // Methods called to control our lifetime. The browser process can be "pinned"
206 // to make sure it keeps running.
207 void Pin();
208 void Unpin();
209
Scott Violet875789e2018-02-02 07:46:48210 // |metrics_services_manager_| owns this.
211 ChromeMetricsServicesManagerClient* metrics_services_manager_client_ =
212 nullptr;
213
dcheng4af48582016-04-19 00:29:35214 std::unique_ptr<metrics_services_manager::MetricsServicesManager>
blundell695d61f2015-10-21 11:25:53215 metrics_services_manager_;
[email protected]2a172e42014-02-21 04:06:10216
dcheng4af48582016-04-19 00:29:35217 std::unique_ptr<IOThread> io_thread_;
initial.commit09911bf2008-07-26 23:55:29218
Scott Violetfdd6f352018-01-12 19:12:29219 bool created_watchdog_thread_ = false;
dcheng4af48582016-04-19 00:29:35220 std::unique_ptr<WatchDogThread> watchdog_thread_;
[email protected]0b565182011-03-02 18:11:15221
Scott Violetfdd6f352018-01-12 19:12:29222 bool created_browser_policy_connector_ = false;
[email protected]3b19e8e2012-10-17 19:15:49223 // Must be destroyed after |local_state_|.
Scott Violetfdd6f352018-01-12 19:12:29224 std::unique_ptr<policy::ChromeBrowserPolicyConnector>
225 browser_policy_connector_;
[email protected]8d6b2432012-03-31 12:11:18226
Scott Violetfdd6f352018-01-12 19:12:29227 bool created_profile_manager_ = false;
dcheng4af48582016-04-19 00:29:35228 std::unique_ptr<ProfileManager> profile_manager_;
initial.commit09911bf2008-07-26 23:55:29229
dcheng4af48582016-04-19 00:29:35230 std::unique_ptr<PrefService> local_state_;
initial.commit09911bf2008-07-26 23:55:29231
Matt Menke21b9cc62017-08-23 15:45:45232 std::unique_ptr<SystemNetworkContextManager> system_network_context_manager_;
233
Helen Li72c87ae42017-11-06 18:31:56234 std::unique_ptr<content::NetworkConnectionTracker>
235 network_connection_tracker_;
236
Scott Violetfdd6f352018-01-12 19:12:29237 bool created_icon_manager_ = false;
dcheng4af48582016-04-19 00:29:35238 std::unique_ptr<IconManager> icon_manager_;
initial.commit09911bf2008-07-26 23:55:29239
dcheng4af48582016-04-19 00:29:35240 std::unique_ptr<GpuModeManager> gpu_mode_manager_;
[email protected]e6933d2a2013-03-12 22:32:21241
brettw00899e62016-11-12 02:10:17242#if BUILDFLAG(ENABLE_EXTENSIONS)
dcheng4af48582016-04-19 00:29:35243 std::unique_ptr<extensions::ExtensionsBrowserClient>
244 extensions_browser_client_;
[email protected]84b7a552014-07-19 04:52:06245
[email protected]5a38dfd2012-07-23 23:22:10246 scoped_refptr<extensions::EventRouterForwarder>
[email protected]3ce02412011-03-01 12:01:15247 extension_event_router_forwarder_;
248
dcheng4af48582016-04-19 00:29:35249 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_;
[email protected]84b7a552014-07-19 04:52:06250#endif
251
[email protected]81054f812012-08-30 00:47:09252#if !defined(OS_ANDROID)
dcheng4af48582016-04-19 00:29:35253 std::unique_ptr<RemoteDebuggingServer> remote_debugging_server_;
254 std::unique_ptr<DevToolsAutoOpener> devtools_auto_opener_;
[email protected]8b60ca722013-07-19 01:29:02255#endif
256
Brett Wilson65f951c2016-11-03 22:06:12257#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
[email protected]d8ce31e2012-12-19 05:09:21258 scoped_refptr<printing::PrintPreviewDialogController>
259 print_preview_dialog_controller_;
[email protected]dbeebd52010-11-16 20:34:16260
dcheng4af48582016-04-19 00:29:35261 std::unique_ptr<printing::BackgroundPrintingManager>
262 background_printing_manager_;
[email protected]84b7a552014-07-19 04:52:06263#endif
[email protected]68f88b992011-05-07 02:01:39264
Jinsong Fan0d46f952018-01-31 18:22:58265#if !defined(OS_ANDROID)
[email protected]29672ab2009-10-30 03:44:03266 // Manager for desktop notification UI.
Scott Violetfdd6f352018-01-12 19:12:29267 bool created_notification_ui_manager_ = false;
dcheng4af48582016-04-19 00:29:35268 std::unique_ptr<NotificationUIManager> notification_ui_manager_;
Jinsong Fan0d46f952018-01-31 18:22:58269#endif
[email protected]29672ab2009-10-30 03:44:03270
dcheng4af48582016-04-19 00:29:35271 std::unique_ptr<IntranetRedirectDetector> intranet_redirect_detector_;
initial.commit09911bf2008-07-26 23:55:29272
dcheng4af48582016-04-19 00:29:35273 std::unique_ptr<StatusTray> status_tray_;
[email protected]9e7f015f2011-05-28 00:24:25274
Joone Hur06fb05f72018-04-19 18:58:23275#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
Scott Violetfdd6f352018-01-12 19:12:29276 bool created_notification_bridge_ = false;
Joone Hur06fb05f72018-04-19 18:58:23277#endif
278
miguelg23cd2dd72016-04-21 15:24:03279 std::unique_ptr<NotificationPlatformBridge> notification_bridge_;
280
Denis Kuznetsov32099f32017-12-15 14:04:57281#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
dcheng4af48582016-04-19 00:29:35282 std::unique_ptr<BackgroundModeManager> background_mode_manager_;
thestige4155842014-10-20 18:58:02283#endif
[email protected]3ba226c52011-10-27 22:50:24284
Scott Violetfdd6f352018-01-12 19:12:29285 bool created_safe_browsing_service_ = false;
vakh9a474d832015-11-13 01:43:09286 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service_;
[email protected]462a0ff2011-06-02 17:15:34287
Scott Violetfdd6f352018-01-12 19:12:29288 bool created_subresource_filter_ruleset_service_ = false;
csharrison8a923d62017-03-10 15:42:13289 std::unique_ptr<subresource_filter::ContentRulesetService>
engedyc5ef21ad2016-06-17 20:22:27290 subresource_filter_ruleset_service_;
291
Scott Violetfdd6f352018-01-12 19:12:29292 bool created_optimization_guide_service_ = false;
Sophie Changf453c0522017-11-03 06:33:49293 std::unique_ptr<optimization_guide::OptimizationGuideService>
294 optimization_guide_service_;
295
Scott Violetfdd6f352018-01-12 19:12:29296 bool shutting_down_ = false;
initial.commit09911bf2008-07-26 23:55:29297
Scott Violetfdd6f352018-01-12 19:12:29298 bool tearing_down_ = false;
csharrison058781a2015-11-24 21:44:03299
initial.commit09911bf2008-07-26 23:55:29300 // Ensures that all the print jobs are finished before closing the browser.
dcheng4af48582016-04-19 00:29:35301 std::unique_ptr<printing::PrintJobManager> print_job_manager_;
initial.commit09911bf2008-07-26 23:55:29302
[email protected]d70539de2009-06-24 22:17:06303 std::string locale_;
initial.commit09911bf2008-07-26 23:55:29304
[email protected]073ed7b2010-09-27 09:20:02305 // Download status updates (like a changing application icon on dock/taskbar)
306 // are global per-application. DownloadStatusUpdater does no work in the ctor
307 // so we don't have to worry about lazy initialization.
dcheng4af48582016-04-19 00:29:35308 std::unique_ptr<DownloadStatusUpdater> download_status_updater_;
[email protected]073ed7b2010-09-27 09:20:02309
[email protected]254ed742011-08-16 18:45:27310 scoped_refptr<DownloadRequestLimiter> download_request_limiter_;
311
[email protected]0de615a2012-11-08 04:40:59312 // Sequenced task runner for local state related I/O tasks.
313 const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_;
314
[email protected]2a7e7c152010-10-01 20:12:09315 // Ensures that the observers of plugin/print disable/enable state
[email protected]492d2142010-09-10 13:55:18316 // notifications are properly added and removed.
[email protected]2a7e7c152010-10-01 20:12:09317 PrefChangeRegistrar pref_change_registrar_;
[email protected]492d2142010-09-10 13:55:18318
[email protected]b2fcd0e2010-12-01 15:19:40319 // Lives here so can safely log events on shutdown.
dcheng4af48582016-04-19 00:29:35320 std::unique_ptr<net_log::ChromeNetLog> net_log_;
[email protected]b2fcd0e2010-12-01 15:19:40321
dcheng4af48582016-04-19 00:29:35322 std::unique_ptr<ChromeResourceDispatcherHostDelegate>
[email protected]8bcdf072011-06-03 16:52:15323 resource_dispatcher_host_delegate_;
[email protected]1459fb62011-05-25 19:03:27324
Michael Giuffridadc8030c2017-08-02 13:22:44325#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
danakj8c3eb802015-09-24 07:53:00326 base::RepeatingTimer autoupdate_timer_;
[email protected]bd48c2b02010-04-09 20:32:42327
328 // Gets called by autoupdate timer to see if browser needs restart and can be
329 // restarted, and if that's the case, restarts the browser.
330 void OnAutoupdateTimer();
Greg Thompsonf9ce2502017-11-14 00:13:35331 bool IsRunningInBackground() const;
332 void OnPendingRestartResult(bool is_update_pending_restart);
[email protected]f6e6d2e2011-10-28 18:39:22333 void RestartBackgroundInstance();
Michael Giuffridadc8030c2017-08-02 13:22:44334#endif // defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
[email protected]bd48c2b02010-04-09 20:32:42335
[email protected]9f108f22013-04-09 00:39:56336 // component updater is normally not used under ChromeOS due
337 // to concerns over integrity of data shared between profiles,
338 // but some users of component updater only install per-user.
dcheng4af48582016-04-19 00:29:35339 std::unique_ptr<component_updater::ComponentUpdateService> component_updater_;
thestig11b815e92014-08-26 00:32:14340
dcheng4af48582016-04-19 00:29:35341 std::unique_ptr<component_updater::SupervisedUserWhitelistInstaller>
bauerb22951c32015-02-12 13:18:17342 supervised_user_whitelist_installer_;
343
bauerbecab4f52017-03-13 20:16:41344#if BUILDFLAG(ENABLE_PLUGINS)
dcheng4af48582016-04-19 00:29:35345 std::unique_ptr<PluginsResourceService> plugins_resource_service_;
[email protected]2366a3a2012-10-02 20:41:14346#endif
[email protected]e9613b52012-11-27 22:35:13347
dcheng4af48582016-04-19 00:29:35348 std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
[email protected]7cad6b0d2013-04-25 20:29:32349
[email protected]6b4e6852012-02-14 04:02:48350 // TODO(eroman): Remove this when done debugging 113031. This tracks
351 // the callstack which released the final module reference count.
352 base::debug::StackTrace release_last_reference_callstack_;
353
Brett Wilson0748bf412016-11-22 17:55:46354#if BUILDFLAG(ENABLE_WEBRTC)
[email protected]bbf32c52013-06-03 14:05:52355 // Lazily initialized.
dcheng4af48582016-04-19 00:29:35356 std::unique_ptr<WebRtcLogUploader> webrtc_log_uploader_;
Elad Alon7264d6a2018-03-21 15:06:26357
358 // WebRtcEventLogManager is a singleton which is instaniated before anything
359 // that needs it, and lives until ~BrowserProcessImpl(). This allows it to
360 // safely post base::Unretained(this) references to an internally owned task
361 // queue, since after ~BrowserProcessImpl(), those tasks would no longer run.
362 std::unique_ptr<WebRtcEventLogManager> webrtc_event_log_manager_;
[email protected]bbf32c52013-06-03 14:05:52363#endif
364
dcheng4af48582016-04-19 00:29:35365 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_;
[email protected]72f93712014-05-19 15:10:39366
dcheng4af48582016-04-19 00:29:35367 std::unique_ptr<gcm::GCMDriver> gcm_driver_;
[email protected]c027d6d2014-06-05 15:25:40368
dcheng4af48582016-04-19 00:29:35369 std::unique_ptr<ChromeChildProcessWatcher> child_process_watcher_;
wfh22e2f4a22015-04-28 22:39:21370
dcheng4af48582016-04-19 00:29:35371 std::unique_ptr<ChromeDeviceClient> device_client_;
reillyge471fab2014-08-29 01:58:43372
hajimehoshi049996b2016-04-26 07:23:35373#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
Georges Khalil293593a62015-07-13 14:37:14374 // Any change to this #ifdef must be reflected as well in
lpyfedf65a2017-06-01 01:41:24375 // chrome/browser/resource_coordinator/tab_manager_browsertest.cc
376 std::unique_ptr<resource_coordinator::TabManager> tab_manager_;
Francois Doraya271a5c2018-04-03 18:37:11377 std::unique_ptr<resource_coordinator::TabLifecycleUnitSource>
378 tab_lifecycle_unit_source_;
georgesak7b5281922015-06-30 13:25:17379#endif
380
Scott Violetfdd6f352018-01-12 19:12:29381 shell_integration::DefaultWebClientState cached_default_web_client_state_ =
382 shell_integration::UNKNOWN_DEFAULT;
grtf14398c2015-07-14 15:11:44383
Sam McNallye36abbc2017-07-20 01:04:28384 std::unique_ptr<prefs::InProcessPrefServiceFactory> pref_service_factory_;
385
gab25894fe2017-05-30 03:40:36386 SEQUENCE_CHECKER(sequence_checker_);
387
[email protected]58dca552009-06-17 00:35:02388 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl);
initial.commit09911bf2008-07-26 23:55:29389};
390
[email protected]58dca552009-06-17 00:35:02391#endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_