Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
| 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] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 10 | #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| 11 | #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 12 | |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 13 | #include <stdint.h> |
| 14 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 15 | #include <memory> |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 16 | #include <string> |
| 17 | |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 18 | #include "base/memory/raw_ptr.h" |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 19 | #include "base/memory/ref_counted.h" |
gab | 25894fe | 2017-05-30 03:40:36 | [diff] [blame] | 20 | #include "base/sequence_checker.h" |
[email protected] | 4dcb797 | 2013-06-28 15:15:41 | [diff] [blame] | 21 | #include "base/timer/timer.h" |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 22 | #include "build/build_config.h" |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 23 | #include "build/chromeos_buildflags.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 24 | #include "chrome/browser/browser_process.h" |
Scott Violet | 6200d33 | 2018-02-23 21:29:23 | [diff] [blame] | 25 | #include "chrome/common/buildflags.h" |
Michael Giuffrida | 2dbce0d1 | 2017-09-02 03:30:59 | [diff] [blame] | 26 | #include "components/keep_alive_registry/keep_alive_state_observer.h" |
Xi Han | 07bad289 | 2018-10-04 15:13:58 | [diff] [blame] | 27 | #include "components/metrics_services_manager/metrics_services_manager.h" |
Scott Violet | 9ae8289 | 2018-03-01 18:38:12 | [diff] [blame] | 28 | #include "components/nacl/common/buildflags.h" |
Xi Han | ddb1ab1 | 2018-08-27 22:18:54 | [diff] [blame] | 29 | #include "components/prefs/persistent_pref_store.h" |
brettw | b1fc1b8 | 2016-02-02 00:19:08 | [diff] [blame] | 30 | #include "components/prefs/pref_change_registrar.h" |
Scott Violet | c8240b0 | 2018-03-08 22:03:59 | [diff] [blame] | 31 | #include "extensions/buildflags/buildflags.h" |
Scott Violet | a35f9a4 | 2018-03-22 22:00:44 | [diff] [blame] | 32 | #include "media/media_buildflags.h" |
Scott Violet | 02e38b9 | 2018-03-27 23:42:14 | [diff] [blame] | 33 | #include "ppapi/buildflags/buildflags.h" |
Scott Violet | 318a55f | 2018-03-30 19:08:19 | [diff] [blame] | 34 | #include "printing/buildflags/buildflags.h" |
Tarun Bansal | 86b3922 | 2018-09-21 02:07:32 | [diff] [blame] | 35 | #include "services/network/public/cpp/network_quality_tracker.h" |
Takuto Ikuta | aa3b796c | 2019-02-06 02:54:56 | [diff] [blame] | 36 | #include "services/network/public/mojom/network_service.mojom-forward.h" |
Abigail Klein | 7a63c57 | 2024-02-28 20:45:09 | [diff] [blame] | 37 | #include "services/screen_ai/buildflags/buildflags.h" |
[email protected] | b112a4c | 2009-02-01 20:24:01 | [diff] [blame] | 38 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 39 | #if !BUILDFLAG(IS_ANDROID) |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 40 | #include "chrome/browser/upgrade_detector/build_state.h" |
| 41 | #endif |
| 42 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 43 | #if BUILDFLAG(IS_ANDROID) |
Oksana Zhuravlova | 3a4e421 | 2021-02-17 21:51:33 | [diff] [blame] | 44 | #include "base/android/application_status_listener.h" |
Amanda Lin Dietz | 8864d30 | 2023-06-26 18:36:39 | [diff] [blame] | 45 | #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 46 | #endif // BUILDFLAG(IS_ANDROID) |
Oksana Zhuravlova | 3a4e421 | 2021-02-17 21:51:33 | [diff] [blame] | 47 | |
Ryan Sturm | f0ad429 | 2019-05-10 00:51:10 | [diff] [blame] | 48 | class BatteryMetrics; |
Scott Violet | 875789e | 2018-02-02 07:46:48 | [diff] [blame] | 49 | class ChromeMetricsServicesManagerClient; |
dgozman | 54cc54e | 2016-02-23 03:47:30 | [diff] [blame] | 50 | class DevToolsAutoOpener; |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 51 | class RemoteDebuggingServer; |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 52 | class PrefRegistrySimple; |
Nicolas Dossou-Gbete | 5522bb0 | 2023-11-24 00:31:35 | [diff] [blame] | 53 | class SearchEngineChoiceProfileTagger; |
Lukasz Anforowicz | 60d1253d | 2019-05-08 16:31:37 | [diff] [blame] | 54 | class SecureOriginPrefsObserver; |
Lukasz Anforowicz | 65c6116 | 2019-03-27 20:33:58 | [diff] [blame] | 55 | class SiteIsolationPrefsObserver; |
Toni Barzic | b598380e | 2018-11-26 19:14:10 | [diff] [blame] | 56 | class SystemNotificationHelper; |
Xi Han | 85079c2 | 2019-04-18 21:43:05 | [diff] [blame] | 57 | class StartupData; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 58 | |
Jesse McKenna | 98e60df | 2021-08-17 16:57:08 | [diff] [blame] | 59 | namespace breadcrumbs { |
| 60 | class ApplicationBreadcrumbsLogger; |
Jesse McKenna | 98e60df | 2021-08-17 16:57:08 | [diff] [blame] | 61 | } // namespace breadcrumbs |
| 62 | |
James Scott | f4b5766 | 2023-05-17 20:52:28 | [diff] [blame] | 63 | namespace embedder_support { |
| 64 | class OriginTrialsSettingsStorage; |
| 65 | } // namespace embedder_support |
| 66 | |
[email protected] | aa3dd49 | 2013-11-05 17:09:09 | [diff] [blame] | 67 | namespace extensions { |
Alex Cooper | 29c20fc | 2022-12-22 18:17:05 | [diff] [blame] | 68 | class ChromeExtensionsBrowserClient; |
[email protected] | aa3dd49 | 2013-11-05 17:09:09 | [diff] [blame] | 69 | } |
| 70 | |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 71 | namespace gcm { |
| 72 | class GCMDriver; |
| 73 | } |
| 74 | |
Will Harris | 9b89cb0 | 2023-10-18 21:56:09 | [diff] [blame] | 75 | namespace os_crypt_async { |
| 76 | class OSCryptAsync; |
| 77 | } |
| 78 | |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame] | 79 | namespace policy { |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 80 | class ChromeBrowserPolicyConnector; |
[email protected] | a4179c2a | 2012-02-09 18:14:21 | [diff] [blame] | 81 | class PolicyService; |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 82 | } // namespace policy |
[email protected] | fcf5357 | 2011-06-29 15:44:37 | [diff] [blame] | 83 | |
Elad Alon | 39b1f6cc | 2018-08-30 09:52:21 | [diff] [blame] | 84 | namespace webrtc_event_logging { |
| 85 | class WebRtcEventLogManager; |
| 86 | } // namespace webrtc_event_logging |
| 87 | |
Akihiro Ota | cee2d14 | 2021-06-08 00:52:05 | [diff] [blame] | 88 | namespace speech { |
Rob Schonberger | 6d23a43 | 2024-03-25 23:25:49 | [diff] [blame] | 89 | class SodaInstaller; |
Akihiro Ota | cee2d14 | 2021-06-08 00:52:05 | [diff] [blame] | 90 | } // namespace speech |
| 91 | |
Ramin Halavati | ec90e02 | 2023-05-23 13:55:05 | [diff] [blame] | 92 | namespace screen_ai { |
Ramin Halavati | ef04cb2 | 2023-08-25 08:29:30 | [diff] [blame] | 93 | class ScreenAIInstallState; |
Ramin Halavati | ec90e02 | 2023-05-23 13:55:05 | [diff] [blame] | 94 | } // namespace screen_ai |
| 95 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 96 | // Real implementation of BrowserProcess that creates and returns the services. |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 97 | class BrowserProcessImpl : public BrowserProcess, |
dgn | fe075c8 | 2016-03-18 11:25:35 | [diff] [blame] | 98 | public KeepAliveStateObserver { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 99 | public: |
Xi Han | 85079c2 | 2019-04-18 21:43:05 | [diff] [blame] | 100 | // |startup_data| should not be null. The BrowserProcessImpl |
Xi Han | 07bad289 | 2018-10-04 15:13:58 | [diff] [blame] | 101 | // will take the PrefService owned by the creator as the Local State instead |
| 102 | // of loading the JSON file from disk. |
Xi Han | 85079c2 | 2019-04-18 21:43:05 | [diff] [blame] | 103 | explicit BrowserProcessImpl(StartupData* startup_data); |
Peter Boström | 53c6c595 | 2021-09-17 09:41:26 | [diff] [blame] | 104 | |
| 105 | BrowserProcessImpl(const BrowserProcessImpl&) = delete; |
| 106 | BrowserProcessImpl& operator=(const BrowserProcessImpl&) = delete; |
| 107 | |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 108 | ~BrowserProcessImpl() override; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 109 | |
Scott Violet | 875789e | 2018-02-02 07:46:48 | [diff] [blame] | 110 | // Called to complete initialization. |
| 111 | void Init(); |
| 112 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 113 | #if !BUILDFLAG(IS_ANDROID) |
Greg Thompson | 822ab51a | 2018-09-18 06:45:29 | [diff] [blame] | 114 | // Sets a closure to be run to break out of a run loop on browser shutdown |
| 115 | // (when the KeepAlive count reaches zero). |
| 116 | // TODO(https://crbug.com/845966): This is also used on macOS for the Cocoa |
| 117 | // first run dialog so that shutdown can be initiated via a signal while the |
| 118 | // first run dialog is showing. |
Filip Gorski | 209a347 | 2018-08-27 23:03:41 | [diff] [blame] | 119 | void SetQuitClosure(base::OnceClosure quit_closure); |
Wez | 25fd35f | 2018-05-25 22:57:41 | [diff] [blame] | 120 | #endif |
| 121 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 122 | #if BUILDFLAG(IS_MAC) |
Greg Thompson | 822ab51a | 2018-09-18 06:45:29 | [diff] [blame] | 123 | // Clears the quit closure. Shutdown will not be initiated should the |
| 124 | // KeepAlive count reach zero. This function may be called more than once. |
| 125 | // TODO(https://crbug.com/845966): Remove this once the Cocoa first run |
| 126 | // dialog no longer needs it. |
| 127 | void ClearQuitClosure(); |
Wez | 25fd35f | 2018-05-25 22:57:41 | [diff] [blame] | 128 | #endif |
| 129 | |
[email protected] | 9990736 | 2012-01-11 05:41:40 | [diff] [blame] | 130 | // Called before the browser threads are created. |
Gabriel Charette | 4c1897a | 2022-05-02 18:22:25 | [diff] [blame] | 131 | void PreCreateThreads(); |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 132 | |
[email protected] | d2caaa2 | 2011-12-12 03:04:15 | [diff] [blame] | 133 | // Called after the threads have been created but before the message loops |
| 134 | // starts running. Allows the browser process to do any initialization that |
| 135 | // requires all threads running. |
| 136 | void PreMainMessageLoopRun(); |
| 137 | |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 138 | // Most cleanup is done by these functions, driven from |
| 139 | // ChromeBrowserMain based on notifications from the content |
| 140 | // framework, rather than in the destructor, so that we can |
| 141 | // interleave cleanup with threads being stopped. |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 142 | #if !BUILDFLAG(IS_ANDROID) |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 143 | void StartTearDown(); |
[email protected] | 9990736 | 2012-01-11 05:41:40 | [diff] [blame] | 144 | void PostDestroyThreads(); |
thestig | d75ce553 | 2015-10-05 22:08:34 | [diff] [blame] | 145 | #endif |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 146 | |
Xi Han | 07bad289 | 2018-10-04 15:13:58 | [diff] [blame] | 147 | // Sets |metrics_services_manager_| and |metrics_services_manager_client_| |
| 148 | // which is owned by it. |
| 149 | void SetMetricsServices( |
| 150 | std::unique_ptr<metrics_services_manager::MetricsServicesManager> manager, |
| 151 | metrics_services_manager::MetricsServicesManagerClient* client); |
| 152 | |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 153 | // BrowserProcess implementation. |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 154 | void EndSession() override; |
Gabriel Charette | b1af7ffb | 2017-07-27 06:10:35 | [diff] [blame] | 155 | void FlushLocalStateAndReply(base::OnceClosure reply) override; |
blundell | 695d61f | 2015-10-21 11:25:53 | [diff] [blame] | 156 | metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager() |
| 157 | override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 158 | metrics::MetricsService* metrics_service() override; |
Min Qin | 8caab1d | 2018-10-03 17:28:13 | [diff] [blame] | 159 | // TODO(qinmin): Remove this method as callers can retrieve the global |
| 160 | // instance from SystemNetworkContextManager directly. |
Matt Menke | 21b9cc6 | 2017-08-23 15:45:45 | [diff] [blame] | 161 | SystemNetworkContextManager* system_network_context_manager() override; |
Antonio Gomes | acd1a94 | 2018-07-10 20:23:54 | [diff] [blame] | 162 | scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory() |
| 163 | override; |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 164 | network::NetworkQualityTracker* network_quality_tracker() override; |
James Scott | f4b5766 | 2023-05-17 20:52:28 | [diff] [blame] | 165 | embedder_support::OriginTrialsSettingsStorage* |
| 166 | GetOriginTrialsSettingsStorage() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 167 | ProfileManager* profile_manager() override; |
| 168 | PrefService* local_state() override; |
blundell | 57bcfed | 2015-09-04 08:44:45 | [diff] [blame] | 169 | variations::VariationsService* variations_service() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 170 | BrowserProcessPlatformPart* platform_part() override; |
| 171 | extensions::EventRouterForwarder* extension_event_router_forwarder() override; |
| 172 | NotificationUIManager* notification_ui_manager() override; |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 173 | NotificationPlatformBridge* notification_platform_bridge() override; |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 174 | policy::ChromeBrowserPolicyConnector* browser_policy_connector() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 175 | policy::PolicyService* policy_service() override; |
| 176 | IconManager* icon_manager() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 177 | GpuModeManager* gpu_mode_manager() override; |
Pavel Feldman | c9ae59c | 2018-02-13 16:15:15 | [diff] [blame] | 178 | void CreateDevToolsProtocolHandler() override; |
dgozman | 54cc54e | 2016-02-23 03:47:30 | [diff] [blame] | 179 | void CreateDevToolsAutoOpener() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 180 | bool IsShuttingDown() override; |
| 181 | printing::PrintJobManager* print_job_manager() override; |
| 182 | printing::PrintPreviewDialogController* print_preview_dialog_controller() |
| 183 | override; |
| 184 | printing::BackgroundPrintingManager* background_printing_manager() override; |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 185 | #if !BUILDFLAG(IS_ANDROID) |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 186 | IntranetRedirectDetector* intranet_redirect_detector() override; |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 187 | #endif |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 188 | const std::string& GetApplicationLocale() override; |
Xi Han | 349162b | 2018-10-26 12:44:23 | [diff] [blame] | 189 | void SetApplicationLocale(const std::string& actual_locale) override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 190 | DownloadStatusUpdater* download_status_updater() override; |
| 191 | DownloadRequestLimiter* download_request_limiter() override; |
| 192 | BackgroundModeManager* background_mode_manager() override; |
Reid Kleckner | 4d3f21c | 2021-01-25 22:48:31 | [diff] [blame] | 193 | #if BUILDFLAG(ENABLE_BACKGROUND_MODE) |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 194 | void set_background_mode_manager_for_test( |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 195 | std::unique_ptr<BackgroundModeManager> manager) override; |
Reid Kleckner | 4d3f21c | 2021-01-25 22:48:31 | [diff] [blame] | 196 | #endif |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 197 | StatusTray* status_tray() override; |
vakh | 9a474d83 | 2015-11-13 01:43:09 | [diff] [blame] | 198 | safe_browsing::SafeBrowsingService* safe_browsing_service() override; |
Eric Robinson | efb3ea55 | 2018-11-02 18:24:32 | [diff] [blame] | 199 | subresource_filter::RulesetService* subresource_filter_ruleset_service() |
| 200 | override; |
Zainab Rizvi | 76626698 | 2024-04-09 13:55:41 | [diff] [blame^] | 201 | subresource_filter::RulesetService* |
| 202 | fingerprinting_protection_ruleset_service() override; |
[email protected] | 6641bf66 | 2009-08-21 00:34:09 | [diff] [blame] | 203 | |
Xi Han | 9fd4400 | 2019-04-30 17:39:36 | [diff] [blame] | 204 | StartupData* startup_data() override; |
| 205 | |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 206 | // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch |
| 207 | // of lacros-chrome is complete. |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 208 | #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) |
dcheng | e1bc798 | 2014-10-30 00:32:40 | [diff] [blame] | 209 | void StartAutoupdateTimer() override; |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 210 | #endif |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 211 | |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 212 | component_updater::ComponentUpdateService* component_updater() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 213 | MediaFileSystemRegistry* media_file_system_registry() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 214 | WebRtcLogUploader* webrtc_log_uploader() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 215 | network_time::NetworkTimeTracker* network_time_tracker() override; |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 216 | #if !BUILDFLAG(IS_ANDROID) |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 217 | gcm::GCMDriver* gcm_driver() override; |
Adam Langley | 1cb73c7 | 2020-08-28 17:06:44 | [diff] [blame] | 218 | #endif |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 219 | resource_coordinator::TabManager* GetTabManager() override; |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 220 | resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() |
| 221 | override; |
[email protected] | ca167a3 | 2011-09-30 15:19:11 | [diff] [blame] | 222 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 223 | #if !BUILDFLAG(IS_ANDROID) |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 224 | SerialPolicyAllowedPorts* serial_policy_allowed_ports() override; |
Jack Hsieh | ea76b94b5 | 2022-12-13 16:37:05 | [diff] [blame] | 225 | HidSystemTrayIcon* hid_system_tray_icon() override; |
Juan Garza Sanchez | 696d4319 | 2023-07-11 21:58:06 | [diff] [blame] | 226 | UsbSystemTrayIcon* usb_system_tray_icon() override; |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 227 | #endif |
| 228 | |
Will Harris | 9b89cb0 | 2023-10-18 21:56:09 | [diff] [blame] | 229 | os_crypt_async::OSCryptAsync* os_crypt_async() override; |
| 230 | |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 231 | BuildState* GetBuildState() override; |
| 232 | |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 233 | static void RegisterPrefs(PrefRegistrySimple* registry); |
| 234 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 235 | private: |
Elad Alon | 39b1f6cc | 2018-08-30 09:52:21 | [diff] [blame] | 236 | using WebRtcEventLogManager = webrtc_event_logging::WebRtcEventLogManager; |
| 237 | |
dgn | fe075c8 | 2016-03-18 11:25:35 | [diff] [blame] | 238 | // KeepAliveStateObserver implementation |
| 239 | void OnKeepAliveStateChanged(bool is_keeping_alive) override; |
| 240 | void OnKeepAliveRestartStateChanged(bool can_restart) override; |
| 241 | |
Tarun Bansal | 86b3922 | 2018-09-21 02:07:32 | [diff] [blame] | 242 | // Create network quality observer so that it can propagate network quality |
| 243 | // changes to the render process. |
| 244 | void CreateNetworkQualityObserver(); |
| 245 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 246 | void CreateProfileManager(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 247 | void CreateIconManager(); |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 248 | void CreateNotificationPlatformBridge(); |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 249 | void CreateNotificationUIManager(); |
[email protected] | d8ce31e | 2012-12-19 05:09:21 | [diff] [blame] | 250 | void CreatePrintPreviewDialogController(); |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 251 | void CreateBackgroundPrintingManager(); |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 252 | void CreateSafeBrowsingService(); |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 253 | void CreateSubresourceFilterRulesetService(); |
Zainab Rizvi | 76626698 | 2024-04-09 13:55:41 | [diff] [blame^] | 254 | void CreateFingerprintingProtectionRulesetService(); |
Sophie Chang | f453c052 | 2017-11-03 06:33:49 | [diff] [blame] | 255 | void CreateOptimizationGuideService(); |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 256 | void CreateStatusTray(); |
| 257 | void CreateBackgroundModeManager(); |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 258 | void CreateGCMDriver(); |
Kalvin Lee | 5873f73 | 2022-07-27 01:58:22 | [diff] [blame] | 259 | void CreateNetworkTimeTracker(); |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 260 | |
[email protected] | b61f62a | 2011-11-01 02:02:10 | [diff] [blame] | 261 | void ApplyDefaultBrowserPolicy(); |
[email protected] | 419a057 | 2011-04-18 22:21:46 | [diff] [blame] | 262 | |
dgn | fe075c8 | 2016-03-18 11:25:35 | [diff] [blame] | 263 | // Methods called to control our lifetime. The browser process can be "pinned" |
| 264 | // to make sure it keeps running. |
| 265 | void Pin(); |
| 266 | void Unpin(); |
| 267 | |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 268 | const raw_ptr<StartupData> startup_data_; |
Greg Thompson | d4ecaa9 | 2020-08-20 09:15:40 | [diff] [blame] | 269 | |
[email protected] | 3b19e8e | 2012-10-17 19:15:49 | [diff] [blame] | 270 | // Must be destroyed after |local_state_|. |
Arthur Sonzogni | cf2ba42a | 2022-06-23 14:11:33 | [diff] [blame] | 271 | // Must be destroyed after |profile_manager_|. |
Lei Zhang | 93477ba | 2022-09-29 19:47:51 | [diff] [blame] | 272 | std::unique_ptr<policy::ChromeBrowserPolicyConnector> const |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 273 | browser_policy_connector_; |
[email protected] | 8d6b243 | 2012-03-31 12:11:18 | [diff] [blame] | 274 | |
Arthur Sonzogni | cf2ba42a | 2022-06-23 14:11:33 | [diff] [blame] | 275 | // Must be destroyed before |browser_policy_connector_|. |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 276 | bool created_profile_manager_ = false; |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 277 | std::unique_ptr<ProfileManager> profile_manager_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 278 | |
Lei Zhang | e86673c | 2021-05-21 01:55:19 | [diff] [blame] | 279 | const std::unique_ptr<PrefService> local_state_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 280 | |
Pavol Marko | 11f1bb4 | 2020-03-30 18:58:38 | [diff] [blame] | 281 | // |metrics_services_manager_| owns this. |
Pâris | e6361d0 | 2023-07-19 09:00:43 | [diff] [blame] | 282 | raw_ptr<ChromeMetricsServicesManagerClient, AcrossTasksDanglingUntriaged> |
Ali Hijazi | 9594a64 | 2022-12-01 14:30:56 | [diff] [blame] | 283 | metrics_services_manager_client_ = nullptr; |
Pavol Marko | 11f1bb4 | 2020-03-30 18:58:38 | [diff] [blame] | 284 | |
| 285 | // Must be destroyed before |local_state_|. |
| 286 | std::unique_ptr<metrics_services_manager::MetricsServicesManager> |
| 287 | metrics_services_manager_; |
| 288 | |
Amanda Lin Dietz | 8864d30 | 2023-06-26 18:36:39 | [diff] [blame] | 289 | #if BUILDFLAG(IS_ANDROID) |
| 290 | // Must be destroyed before |local_state_|. |
| 291 | std::unique_ptr<accessibility::AccessibilityPrefsController> |
| 292 | accessibility_prefs_controller_; |
| 293 | #endif |
| 294 | |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 295 | std::unique_ptr<network::NetworkQualityTracker> network_quality_tracker_; |
| 296 | |
Tarun Bansal | 86b3922 | 2018-09-21 02:07:32 | [diff] [blame] | 297 | // Listens to NetworkQualityTracker and sends network quality updates to the |
| 298 | // renderer. |
| 299 | std::unique_ptr< |
| 300 | network::NetworkQualityTracker::RTTAndThroughputEstimatesObserver> |
| 301 | network_quality_observer_; |
| 302 | |
James Scott | f4b5766 | 2023-05-17 20:52:28 | [diff] [blame] | 303 | std::unique_ptr<embedder_support::OriginTrialsSettingsStorage> |
| 304 | origin_trials_settings_storage_; |
| 305 | |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 306 | bool created_icon_manager_ = false; |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 307 | std::unique_ptr<IconManager> icon_manager_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 308 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 309 | std::unique_ptr<GpuModeManager> gpu_mode_manager_; |
[email protected] | e6933d2a | 2013-03-12 22:32:21 | [diff] [blame] | 310 | |
brettw | 00899e6 | 2016-11-12 02:10:17 | [diff] [blame] | 311 | #if BUILDFLAG(ENABLE_EXTENSIONS) |
Alex Cooper | 29c20fc | 2022-12-22 18:17:05 | [diff] [blame] | 312 | std::unique_ptr<extensions::ChromeExtensionsBrowserClient> |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 313 | extensions_browser_client_; |
[email protected] | 84b7a55 | 2014-07-19 04:52:06 | [diff] [blame] | 314 | |
[email protected] | 5a38dfd | 2012-07-23 23:22:10 | [diff] [blame] | 315 | scoped_refptr<extensions::EventRouterForwarder> |
[email protected] | 3ce0241 | 2011-03-01 12:01:15 | [diff] [blame] | 316 | extension_event_router_forwarder_; |
| 317 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 318 | std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_; |
[email protected] | 84b7a55 | 2014-07-19 04:52:06 | [diff] [blame] | 319 | #endif |
| 320 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 321 | #if !BUILDFLAG(IS_ANDROID) |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 322 | std::unique_ptr<RemoteDebuggingServer> remote_debugging_server_; |
| 323 | std::unique_ptr<DevToolsAutoOpener> devtools_auto_opener_; |
[email protected] | 8b60ca72 | 2013-07-19 01:29:02 | [diff] [blame] | 324 | #endif |
| 325 | |
Brett Wilson | 65f951c | 2016-11-03 22:06:12 | [diff] [blame] | 326 | #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
Lei Zhang | 2484480a | 2024-01-17 18:14:21 | [diff] [blame] | 327 | std::unique_ptr<printing::PrintPreviewDialogController> |
[email protected] | d8ce31e | 2012-12-19 05:09:21 | [diff] [blame] | 328 | print_preview_dialog_controller_; |
[email protected] | dbeebd5 | 2010-11-16 20:34:16 | [diff] [blame] | 329 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 330 | std::unique_ptr<printing::BackgroundPrintingManager> |
| 331 | background_printing_manager_; |
[email protected] | 84b7a55 | 2014-07-19 04:52:06 | [diff] [blame] | 332 | #endif |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 333 | |
Richard Knoll | 232ad51 | 2021-06-10 17:30:08 | [diff] [blame] | 334 | #if BUILDFLAG(ENABLE_CHROME_NOTIFICATIONS) |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 335 | // Manager for desktop notification UI. |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 336 | bool created_notification_ui_manager_ = false; |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 337 | std::unique_ptr<NotificationUIManager> notification_ui_manager_; |
Jinsong Fan | 0d46f95 | 2018-01-31 18:22:58 | [diff] [blame] | 338 | #endif |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 339 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 340 | #if !BUILDFLAG(IS_ANDROID) |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 341 | std::unique_ptr<IntranetRedirectDetector> intranet_redirect_detector_; |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 342 | #endif |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 343 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 344 | std::unique_ptr<StatusTray> status_tray_; |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 345 | |
Peter Beverloo | c30c9ddf | 2021-02-24 19:56:03 | [diff] [blame] | 346 | #if BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 347 | bool created_notification_bridge_ = false; |
Joone Hur | 06fb05f7 | 2018-04-19 18:58:23 | [diff] [blame] | 348 | #endif |
| 349 | |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 350 | std::unique_ptr<NotificationPlatformBridge> notification_bridge_; |
| 351 | |
Toni Barzic | b598380e | 2018-11-26 19:14:10 | [diff] [blame] | 352 | // Use SystemNotificationHelper::GetInstance to get this instance. |
| 353 | std::unique_ptr<SystemNotificationHelper> system_notification_helper_; |
| 354 | |
Denis Kuznetsov | 32099f3 | 2017-12-15 14:04:57 | [diff] [blame] | 355 | #if BUILDFLAG(ENABLE_BACKGROUND_MODE) |
David Roger | cf0f581 | 2020-11-13 11:42:12 | [diff] [blame] | 356 | // Must be destroyed after the profile manager, because it doesn't remove |
| 357 | // itself as a profile attributes storage observer on destruction. |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 358 | std::unique_ptr<BackgroundModeManager> background_mode_manager_; |
thestig | e415584 | 2014-10-20 18:58:02 | [diff] [blame] | 359 | #endif |
[email protected] | 3ba226c5 | 2011-10-27 22:50:24 | [diff] [blame] | 360 | |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 361 | bool created_safe_browsing_service_ = false; |
vakh | 9a474d83 | 2015-11-13 01:43:09 | [diff] [blame] | 362 | scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service_; |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 363 | |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 364 | bool created_subresource_filter_ruleset_service_ = false; |
Eric Robinson | efb3ea55 | 2018-11-02 18:24:32 | [diff] [blame] | 365 | std::unique_ptr<subresource_filter::RulesetService> |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 366 | subresource_filter_ruleset_service_; |
| 367 | |
Zainab Rizvi | 76626698 | 2024-04-09 13:55:41 | [diff] [blame^] | 368 | bool created_fingerprinting_protection_ruleset_service_ = false; |
| 369 | std::unique_ptr<subresource_filter::RulesetService> |
| 370 | fingerprinting_protection_ruleset_service_; |
| 371 | |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 372 | bool shutting_down_ = false; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 373 | |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 374 | bool tearing_down_ = false; |
csharrison | 058781a | 2015-11-24 21:44:03 | [diff] [blame] | 375 | |
David Dorwin | 5c884f4 | 2022-08-16 01:17:32 | [diff] [blame] | 376 | #if BUILDFLAG(ENABLE_PRINTING) |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 377 | // Ensures that all the print jobs are finished before closing the browser. |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 378 | std::unique_ptr<printing::PrintJobManager> print_job_manager_; |
David Dorwin | 5c884f4 | 2022-08-16 01:17:32 | [diff] [blame] | 379 | #endif |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 380 | |
[email protected] | d70539de | 2009-06-24 22:17:06 | [diff] [blame] | 381 | std::string locale_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 382 | |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 383 | // Download status updates (like a changing application icon on dock/taskbar) |
| 384 | // are global per-application. DownloadStatusUpdater does no work in the ctor |
| 385 | // so we don't have to worry about lazy initialization. |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 386 | std::unique_ptr<DownloadStatusUpdater> download_status_updater_; |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 387 | |
[email protected] | 254ed74 | 2011-08-16 18:45:27 | [diff] [blame] | 388 | scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 389 | |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 390 | // Ensures that the observers of plugin/print disable/enable state |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 391 | // notifications are properly added and removed. |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 392 | PrefChangeRegistrar pref_change_registrar_; |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 393 | |
Ryan Sturm | f0ad429 | 2019-05-10 00:51:10 | [diff] [blame] | 394 | std::unique_ptr<BatteryMetrics> battery_metrics_; |
| 395 | |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 396 | // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch |
| 397 | // of lacros-chrome is complete. |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 398 | #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) |
danakj | 8c3eb80 | 2015-09-24 07:53:00 | [diff] [blame] | 399 | base::RepeatingTimer autoupdate_timer_; |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 400 | |
| 401 | // Gets called by autoupdate timer to see if browser needs restart and can be |
| 402 | // restarted, and if that's the case, restarts the browser. |
| 403 | void OnAutoupdateTimer(); |
Greg Thompson | f9ce250 | 2017-11-14 00:13:35 | [diff] [blame] | 404 | bool IsRunningInBackground() const; |
| 405 | void OnPendingRestartResult(bool is_update_pending_restart); |
[email protected] | f6e6d2e | 2011-10-28 18:39:22 | [diff] [blame] | 406 | void RestartBackgroundInstance(); |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 407 | #endif // BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 408 | // BUILDFLAG(IS_CHROMEOS_LACROS)) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 409 | |
[email protected] | 9f108f2 | 2013-04-09 00:39:56 | [diff] [blame] | 410 | // component updater is normally not used under ChromeOS due |
| 411 | // to concerns over integrity of data shared between profiles, |
| 412 | // but some users of component updater only install per-user. |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 413 | std::unique_ptr<component_updater::ComponentUpdateService> component_updater_; |
thestig | 11b815e9 | 2014-08-26 00:32:14 | [diff] [blame] | 414 | |
Rob Schonberger | 6d23a43 | 2024-03-25 23:25:49 | [diff] [blame] | 415 | #if !BUILDFLAG(IS_ANDROID) |
Akihiro Ota | cee2d14 | 2021-06-08 00:52:05 | [diff] [blame] | 416 | // Used to create a singleton instance of SodaInstallerImpl, which can be |
| 417 | // retrieved using speech::SodaInstaller::GetInstance(). |
| 418 | // SodaInstallerImpl depends on ComponentUpdateService, so define it here |
| 419 | // to ensure that SodaInstallerImpl gets destructed first. |
Rob Schonberger | 6d23a43 | 2024-03-25 23:25:49 | [diff] [blame] | 420 | std::unique_ptr<speech::SodaInstaller> soda_installer_impl_; |
Akihiro Ota | cee2d14 | 2021-06-08 00:52:05 | [diff] [blame] | 421 | #endif |
| 422 | |
Ramin Halavati | ec90e02 | 2023-05-23 13:55:05 | [diff] [blame] | 423 | #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) |
| 424 | // Used to download Screen AI on demand and keep track of the library |
| 425 | // availability. |
Ramin Halavati | ef04cb2 | 2023-08-25 08:29:30 | [diff] [blame] | 426 | std::unique_ptr<screen_ai::ScreenAIInstallState> screen_ai_download_; |
Ramin Halavati | ec90e02 | 2023-05-23 13:55:05 | [diff] [blame] | 427 | #endif |
| 428 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 429 | std::unique_ptr<BrowserProcessPlatformPart> platform_part_; |
[email protected] | 7cad6b0d | 2013-04-25 20:29:32 | [diff] [blame] | 430 | |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 431 | // Lazily initialized. |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 432 | std::unique_ptr<WebRtcLogUploader> webrtc_log_uploader_; |
Elad Alon | 7264d6a | 2018-03-21 15:06:26 | [diff] [blame] | 433 | |
| 434 | // WebRtcEventLogManager is a singleton which is instaniated before anything |
| 435 | // that needs it, and lives until ~BrowserProcessImpl(). This allows it to |
| 436 | // safely post base::Unretained(this) references to an internally owned task |
| 437 | // queue, since after ~BrowserProcessImpl(), those tasks would no longer run. |
| 438 | std::unique_ptr<WebRtcEventLogManager> webrtc_event_log_manager_; |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 439 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 440 | std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; |
[email protected] | 72f9371 | 2014-05-19 15:10:39 | [diff] [blame] | 441 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 442 | std::unique_ptr<gcm::GCMDriver> gcm_driver_; |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 443 | |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 444 | std::unique_ptr<resource_coordinator::ResourceCoordinatorParts> |
| 445 | resource_coordinator_parts_; |
Sam McNally | e36abbc | 2017-07-20 01:04:28 | [diff] [blame] | 446 | |
Lukasz Anforowicz | 60d1253d | 2019-05-08 16:31:37 | [diff] [blame] | 447 | std::unique_ptr<SecureOriginPrefsObserver> secure_origin_prefs_observer_; |
Lukasz Anforowicz | 65c6116 | 2019-03-27 20:33:58 | [diff] [blame] | 448 | std::unique_ptr<SiteIsolationPrefsObserver> site_isolation_prefs_observer_; |
| 449 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 450 | #if !BUILDFLAG(IS_ANDROID) |
Wez | 25fd35f | 2018-05-25 22:57:41 | [diff] [blame] | 451 | // Called to signal the process' main message loop to exit. |
| 452 | base::OnceClosure quit_closure_; |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 453 | |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 454 | std::unique_ptr<SerialPolicyAllowedPorts> serial_policy_allowed_ports_; |
Jack Hsieh | ea76b94b5 | 2022-12-13 16:37:05 | [diff] [blame] | 455 | std::unique_ptr<HidSystemTrayIcon> hid_system_tray_icon_; |
Juan Garza Sanchez | 696d4319 | 2023-07-11 21:58:06 | [diff] [blame] | 456 | std::unique_ptr<UsbSystemTrayIcon> usb_system_tray_icon_; |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 457 | |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 458 | BuildState build_state_; |
Jack Yammine | 1aae2ba | 2023-12-16 06:56:36 | [diff] [blame] | 459 | |
| 460 | std::unique_ptr<SearchEngineChoiceProfileTagger> |
| 461 | search_engine_choice_profile_tagger_; |
Wez | 25fd35f | 2018-05-25 22:57:41 | [diff] [blame] | 462 | #endif |
| 463 | |
Xiaohan Wang | 55ae2c01 | 2022-01-20 21:49:11 | [diff] [blame] | 464 | #if BUILDFLAG(IS_ANDROID) |
Oksana Zhuravlova | 3a4e421 | 2021-02-17 21:51:33 | [diff] [blame] | 465 | std::unique_ptr<base::android::ApplicationStatusListener> app_state_listener_; |
| 466 | #endif |
| 467 | |
Jesse McKenna | 8cb0cbe3 | 2022-03-07 19:34:16 | [diff] [blame] | 468 | // Observes application-wide events and logs them to breadcrumbs. Null if |
| 469 | // breadcrumbs logging is disabled. |
Jesse McKenna | 98e60df | 2021-08-17 16:57:08 | [diff] [blame] | 470 | std::unique_ptr<breadcrumbs::ApplicationBreadcrumbsLogger> |
| 471 | application_breadcrumbs_logger_; |
| 472 | |
Will Harris | 9b89cb0 | 2023-10-18 21:56:09 | [diff] [blame] | 473 | std::unique_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_; |
| 474 | |
gab | 25894fe | 2017-05-30 03:40:36 | [diff] [blame] | 475 | SEQUENCE_CHECKER(sequence_checker_); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 476 | }; |
| 477 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 478 | #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |