2013-10-23 21:30:47 +02:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions (c) 2011 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
#include "libcef/browser/alloy/chrome_browser_process_alloy.h"
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
#include "libcef/browser/alloy/chrome_profile_manager_alloy.h"
|
2019-03-22 23:11:51 +01:00
|
|
|
#include "libcef/browser/browser_context.h"
|
2019-03-24 19:41:42 +01:00
|
|
|
#include "libcef/browser/context.h"
|
2022-01-28 22:16:29 +01:00
|
|
|
#include "libcef/browser/extensions/extensions_browser_client.h"
|
2019-03-21 01:23:23 +01:00
|
|
|
#include "libcef/browser/prefs/browser_prefs.h"
|
2016-07-18 23:22:22 +02:00
|
|
|
#include "libcef/browser/thread_util.h"
|
|
|
|
#include "libcef/common/cef_switches.h"
|
2022-01-28 22:16:29 +01:00
|
|
|
#include "libcef/common/extensions/extensions_client.h"
|
|
|
|
#include "libcef/common/extensions/extensions_util.h"
|
2016-07-18 23:22:22 +02:00
|
|
|
|
|
|
|
#include "base/command_line.h"
|
2021-08-09 23:18:43 +02:00
|
|
|
#include "chrome/browser/component_updater/chrome_component_updater_configurator.h"
|
2019-03-21 01:23:23 +01:00
|
|
|
#include "chrome/browser/net/system_network_context_manager.h"
|
2022-07-07 12:01:24 +02:00
|
|
|
#include "chrome/browser/permissions/chrome_permissions_client.h"
|
2019-03-21 01:23:23 +01:00
|
|
|
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
#include "chrome/browser/printing/background_printing_manager.h"
|
2016-07-18 23:22:22 +02:00
|
|
|
#include "chrome/browser/printing/print_job_manager.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
#include "chrome/browser/printing/print_preview_dialog_controller.h"
|
2019-07-16 19:59:21 +02:00
|
|
|
#include "chrome/browser/ui/prefs/pref_watcher.h"
|
2021-08-09 23:18:43 +02:00
|
|
|
#include "components/component_updater/component_updater_service.h"
|
|
|
|
#include "components/component_updater/timer_update_scheduler.h"
|
2016-11-07 20:14:09 +01:00
|
|
|
#include "components/net_log/chrome_net_log.h"
|
2019-03-21 01:23:23 +01:00
|
|
|
#include "components/prefs/pref_service.h"
|
2019-04-26 22:22:07 +02:00
|
|
|
#include "content/browser/startup_helper.h"
|
2022-08-23 03:37:40 +02:00
|
|
|
#include "content/public/browser/network_service_instance.h"
|
2016-11-07 20:14:09 +01:00
|
|
|
#include "content/public/common/content_switches.h"
|
2019-07-16 19:59:21 +02:00
|
|
|
#include "net/log/net_log_capture_mode.h"
|
2023-04-04 20:00:13 +02:00
|
|
|
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
|
2018-03-20 21:15:08 +01:00
|
|
|
#include "services/network/public/cpp/network_switches.h"
|
2018-07-13 21:29:20 +02:00
|
|
|
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::ChromeBrowserProcessAlloy()
|
2017-05-17 11:29:28 +02:00
|
|
|
: initialized_(false),
|
|
|
|
context_initialized_(false),
|
|
|
|
shutdown_(false),
|
2019-03-24 01:39:54 +01:00
|
|
|
locale_("en-US") {}
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::~ChromeBrowserProcessAlloy() {
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK((!initialized_ && !context_initialized_) || shutdown_);
|
2022-01-28 22:16:29 +01:00
|
|
|
|
|
|
|
if (extensions::ExtensionsEnabled()) {
|
|
|
|
extensions::ExtensionsBrowserClient::Set(nullptr);
|
|
|
|
extensions_browser_client_.reset();
|
|
|
|
}
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::Initialize() {
|
2016-07-18 23:22:22 +02:00
|
|
|
DCHECK(!initialized_);
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK(!context_initialized_);
|
|
|
|
DCHECK(!shutdown_);
|
2019-09-04 17:13:32 +02:00
|
|
|
DCHECK(!field_trial_list_);
|
2016-11-07 20:14:09 +01:00
|
|
|
|
2019-04-26 22:22:07 +02:00
|
|
|
// Initialize this early before any code tries to check feature flags.
|
2019-09-04 17:13:32 +02:00
|
|
|
field_trial_list_ = content::SetUpFieldTrialsAndFeatureList();
|
2019-04-26 22:22:07 +02:00
|
|
|
|
2022-01-28 22:16:29 +01:00
|
|
|
if (extensions::ExtensionsEnabled()) {
|
|
|
|
// Initialize extension global objects before creating the global
|
|
|
|
// BrowserContext.
|
|
|
|
extensions_client_.reset(new extensions::CefExtensionsClient());
|
|
|
|
extensions::ExtensionsClient::Set(extensions_client_.get());
|
|
|
|
extensions_browser_client_.reset(
|
|
|
|
new extensions::CefExtensionsBrowserClient);
|
|
|
|
extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
|
|
|
|
}
|
|
|
|
|
2022-07-07 12:01:24 +02:00
|
|
|
// Make sure permissions client has been set.
|
|
|
|
ChromePermissionsClient::GetInstance();
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
initialized_ = true;
|
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::OnContextInitialized() {
|
2016-11-07 20:14:09 +01:00
|
|
|
CEF_REQUIRE_UIT();
|
|
|
|
DCHECK(initialized_);
|
|
|
|
DCHECK(!context_initialized_);
|
2016-07-18 23:22:22 +02:00
|
|
|
DCHECK(!shutdown_);
|
|
|
|
|
|
|
|
// Must be created after the NotificationService.
|
|
|
|
print_job_manager_.reset(new printing::PrintJobManager());
|
2020-06-28 20:29:44 +02:00
|
|
|
profile_manager_.reset(new ChromeProfileManagerAlloy());
|
2016-07-18 23:22:22 +02:00
|
|
|
event_router_forwarder_ = new extensions::EventRouterForwarder();
|
2016-11-07 20:14:09 +01:00
|
|
|
context_initialized_ = true;
|
2016-07-18 23:22:22 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::CleanupOnUIThread() {
|
2016-07-18 23:22:22 +02:00
|
|
|
CEF_REQUIRE_UIT();
|
|
|
|
DCHECK(initialized_);
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK(context_initialized_);
|
2016-07-18 23:22:22 +02:00
|
|
|
DCHECK(!shutdown_);
|
|
|
|
|
|
|
|
// Wait for the pending print jobs to finish. Don't do this later, since
|
|
|
|
// this might cause a nested message loop to run, and we don't want pending
|
|
|
|
// tasks to run once teardown has started.
|
|
|
|
print_job_manager_->Shutdown();
|
2020-01-15 14:36:24 +01:00
|
|
|
print_job_manager_.reset(nullptr);
|
|
|
|
print_preview_dialog_controller_ = nullptr;
|
2016-07-18 23:22:22 +02:00
|
|
|
|
|
|
|
profile_manager_.reset();
|
|
|
|
event_router_forwarder_ = nullptr;
|
|
|
|
|
2019-07-29 23:27:12 +02:00
|
|
|
if (SystemNetworkContextManager::GetInstance()) {
|
2019-03-25 19:14:23 +01:00
|
|
|
SystemNetworkContextManager::DeleteInstance();
|
|
|
|
}
|
|
|
|
|
2019-07-17 20:47:27 +02:00
|
|
|
// Release any references held by objects associated with a Profile. The
|
|
|
|
// Profile will be deleted later.
|
2020-07-01 02:57:00 +02:00
|
|
|
for (const auto& browser_context : CefBrowserContext::GetAll()) {
|
2019-07-17 20:47:27 +02:00
|
|
|
// Release any references to |local_state_|.
|
2020-07-01 02:57:00 +02:00
|
|
|
auto profile = browser_context->AsProfile();
|
2019-07-16 19:59:21 +02:00
|
|
|
PrefWatcher* pref_watcher = PrefWatcher::Get(profile);
|
2023-01-02 23:59:03 +01:00
|
|
|
if (pref_watcher) {
|
2019-07-16 19:59:21 +02:00
|
|
|
pref_watcher->Shutdown();
|
2023-01-02 23:59:03 +01:00
|
|
|
}
|
2019-07-17 20:47:27 +02:00
|
|
|
|
|
|
|
// Unregister observers for |background_printing_manager_|.
|
|
|
|
if (background_printing_manager_) {
|
|
|
|
background_printing_manager_->DeletePreviewContentsForBrowserContext(
|
|
|
|
profile);
|
|
|
|
}
|
2019-07-16 19:59:21 +02:00
|
|
|
}
|
|
|
|
|
2019-03-21 01:23:23 +01:00
|
|
|
local_state_.reset();
|
|
|
|
browser_policy_connector_.reset();
|
2019-07-17 20:47:27 +02:00
|
|
|
background_printing_manager_.reset();
|
2019-09-04 17:13:32 +02:00
|
|
|
field_trial_list_.reset();
|
2021-10-19 23:25:38 +02:00
|
|
|
component_updater_.reset();
|
2016-07-18 23:22:22 +02:00
|
|
|
|
2019-09-04 17:13:32 +02:00
|
|
|
shutdown_ = true;
|
2019-03-13 22:27:37 +01:00
|
|
|
}
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::EndSession() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2019-03-13 22:27:37 +01:00
|
|
|
}
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
|
2017-09-06 23:40:58 +02:00
|
|
|
base::OnceClosure reply) {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2017-09-06 23:40:58 +02:00
|
|
|
}
|
|
|
|
|
2023-04-04 20:00:13 +02:00
|
|
|
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2023-04-04 20:00:13 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2015-11-10 21:18:16 +01:00
|
|
|
metrics_services_manager::MetricsServicesManager*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2022-08-23 18:20:45 +02:00
|
|
|
return nullptr;
|
2014-06-12 22:28:58 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
metrics::MetricsService* ChromeBrowserProcessAlloy::metrics_service() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2022-08-23 18:20:45 +02:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
SystemNetworkContextManager*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::system_network_context_manager() {
|
2019-03-21 01:23:23 +01:00
|
|
|
DCHECK(SystemNetworkContextManager::GetInstance());
|
|
|
|
return SystemNetworkContextManager::GetInstance();
|
2017-12-07 22:44:24 +01:00
|
|
|
}
|
|
|
|
|
2018-07-02 19:11:49 +02:00
|
|
|
network::NetworkQualityTracker*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::network_quality_tracker() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2022-08-23 18:20:45 +02:00
|
|
|
return nullptr;
|
2018-07-02 19:11:49 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
ProfileManager* ChromeBrowserProcessAlloy::profile_manager() {
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK(context_initialized_);
|
2016-07-18 23:22:22 +02:00
|
|
|
return profile_manager_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
PrefService* ChromeBrowserProcessAlloy::local_state() {
|
2019-03-21 01:23:23 +01:00
|
|
|
DCHECK(initialized_);
|
2019-04-26 23:17:24 +02:00
|
|
|
if (!local_state_) {
|
2020-04-29 21:36:26 +02:00
|
|
|
// Use a location that is shared by all request contexts.
|
2019-04-26 23:17:24 +02:00
|
|
|
const CefSettings& settings = CefContext::Get()->settings();
|
2020-04-29 21:36:26 +02:00
|
|
|
const base::FilePath& root_cache_path =
|
|
|
|
base::FilePath(CefString(&settings.root_cache_path));
|
2019-04-26 23:17:24 +02:00
|
|
|
|
|
|
|
// Used for very early NetworkService initialization.
|
2020-04-01 22:55:36 +02:00
|
|
|
// Always persist preferences for this PrefService if possible because it
|
|
|
|
// contains the cookie encryption key on Windows.
|
2020-04-29 21:36:26 +02:00
|
|
|
local_state_ =
|
|
|
|
browser_prefs::CreatePrefService(nullptr /* profile */, root_cache_path,
|
|
|
|
true /* persist_user_preferences */);
|
2019-04-26 23:17:24 +02:00
|
|
|
}
|
2019-03-21 01:23:23 +01:00
|
|
|
return local_state_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2018-07-13 21:29:20 +02:00
|
|
|
scoped_refptr<network::SharedURLLoaderFactory>
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::shared_url_loader_factory() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2018-07-13 21:29:20 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
variations::VariationsService* ChromeBrowserProcessAlloy::variations_service() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
BrowserProcessPlatformPart* ChromeBrowserProcessAlloy::platform_part() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
extensions::EventRouterForwarder*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::extension_event_router_forwarder() {
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK(context_initialized_);
|
2016-07-18 23:22:22 +02:00
|
|
|
return event_router_forwarder_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
NotificationUIManager* ChromeBrowserProcessAlloy::notification_ui_manager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2016-05-25 01:35:43 +02:00
|
|
|
NotificationPlatformBridge*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::notification_platform_bridge() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2016-05-25 01:35:43 +02:00
|
|
|
}
|
|
|
|
|
2023-04-04 20:00:13 +02:00
|
|
|
void ChromeBrowserProcessAlloy::SetGeolocationManager(
|
|
|
|
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2023-04-04 20:00:13 +02:00
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
policy::ChromeBrowserPolicyConnector*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::browser_policy_connector() {
|
2019-03-21 01:23:23 +01:00
|
|
|
if (!browser_policy_connector_) {
|
|
|
|
browser_policy_connector_ =
|
|
|
|
std::make_unique<policy::ChromeBrowserPolicyConnector>();
|
|
|
|
}
|
|
|
|
return browser_policy_connector_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
policy::PolicyService* ChromeBrowserProcessAlloy::policy_service() {
|
2019-03-21 01:23:23 +01:00
|
|
|
return browser_policy_connector()->GetPolicyService();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
IconManager* ChromeBrowserProcessAlloy::icon_manager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
GpuModeManager* ChromeBrowserProcessAlloy::gpu_mode_manager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::CreateDevToolsProtocolHandler() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2016-03-16 03:55:59 +01:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::CreateDevToolsAutoOpener() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
bool ChromeBrowserProcessAlloy::IsShuttingDown() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2013-10-23 21:30:47 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
printing::PrintJobManager* ChromeBrowserProcessAlloy::print_job_manager() {
|
2016-11-07 20:14:09 +01:00
|
|
|
DCHECK(context_initialized_);
|
2016-07-18 23:22:22 +02:00
|
|
|
return print_job_manager_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
printing::PrintPreviewDialogController*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::print_preview_dialog_controller() {
|
2019-07-17 20:47:27 +02:00
|
|
|
if (!print_preview_dialog_controller_.get()) {
|
|
|
|
print_preview_dialog_controller_ =
|
|
|
|
new printing::PrintPreviewDialogController();
|
|
|
|
}
|
|
|
|
return print_preview_dialog_controller_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
printing::BackgroundPrintingManager*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::background_printing_manager() {
|
2019-07-17 20:47:27 +02:00
|
|
|
if (!background_printing_manager_.get()) {
|
|
|
|
background_printing_manager_.reset(
|
|
|
|
new printing::BackgroundPrintingManager());
|
|
|
|
}
|
|
|
|
return background_printing_manager_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
IntranetRedirectDetector*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::intranet_redirect_detector() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
const std::string& ChromeBrowserProcessAlloy::GetApplicationLocale() {
|
2013-10-23 21:30:47 +02:00
|
|
|
DCHECK(!locale_.empty());
|
|
|
|
return locale_;
|
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::SetApplicationLocale(
|
|
|
|
const std::string& locale) {
|
2013-10-23 21:30:47 +02:00
|
|
|
locale_ = locale;
|
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
DownloadStatusUpdater* ChromeBrowserProcessAlloy::download_status_updater() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
DownloadRequestLimiter* ChromeBrowserProcessAlloy::download_request_limiter() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-27 22:43:23 +02:00
|
|
|
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
|
2020-06-28 20:29:44 +02:00
|
|
|
BackgroundModeManager* ChromeBrowserProcessAlloy::background_mode_manager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::set_background_mode_manager_for_test(
|
2017-05-17 11:29:28 +02:00
|
|
|
std::unique_ptr<BackgroundModeManager> manager) {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
2020-06-27 22:43:23 +02:00
|
|
|
#endif
|
2013-10-23 21:30:47 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
StatusTray* ChromeBrowserProcessAlloy::status_tray() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2015-12-09 17:10:16 +01:00
|
|
|
safe_browsing::SafeBrowsingService*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::safe_browsing_service() {
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2018-11-30 23:21:07 +01:00
|
|
|
subresource_filter::RulesetService*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2016-07-06 21:34:09 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
StartupData* ChromeBrowserProcessAlloy::startup_data() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2019-07-16 19:59:21 +02:00
|
|
|
}
|
|
|
|
|
2022-01-24 18:58:02 +01:00
|
|
|
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
2020-06-28 20:29:44 +02:00
|
|
|
void ChromeBrowserProcessAlloy::StartAutoupdateTimer() {}
|
2013-10-23 21:30:47 +02:00
|
|
|
#endif
|
|
|
|
|
2014-02-05 21:35:45 +01:00
|
|
|
component_updater::ComponentUpdateService*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::component_updater() {
|
2023-01-02 23:59:03 +01:00
|
|
|
if (component_updater_) {
|
2021-08-09 23:18:43 +02:00
|
|
|
return component_updater_.get();
|
2023-01-02 23:59:03 +01:00
|
|
|
}
|
2021-08-09 23:18:43 +02:00
|
|
|
|
|
|
|
if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::unique_ptr<component_updater::UpdateScheduler> scheduler =
|
|
|
|
std::make_unique<component_updater::TimerUpdateScheduler>();
|
|
|
|
|
|
|
|
component_updater_ = component_updater::ComponentUpdateServiceFactory(
|
|
|
|
component_updater::MakeChromeComponentUpdaterConfigurator(
|
|
|
|
base::CommandLine::ForCurrentProcess(),
|
|
|
|
g_browser_process->local_state()),
|
2021-12-16 23:35:54 +01:00
|
|
|
std::move(scheduler), /*brand=*/std::string());
|
2021-08-09 23:18:43 +02:00
|
|
|
|
|
|
|
return component_updater_.get();
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
MediaFileSystemRegistry*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::media_file_system_registry() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
WebRtcLogUploader* ChromeBrowserProcessAlloy::webrtc_log_uploader() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2013-10-23 21:30:47 +02:00
|
|
|
}
|
2014-05-29 19:15:34 +02:00
|
|
|
|
2014-06-12 22:28:58 +02:00
|
|
|
network_time::NetworkTimeTracker*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::network_time_tracker() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2014-06-12 22:28:58 +02:00
|
|
|
}
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
gcm::GCMDriver* ChromeBrowserProcessAlloy::gcm_driver() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2014-05-29 19:15:34 +02:00
|
|
|
}
|
2015-07-24 02:06:56 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
resource_coordinator::TabManager* ChromeBrowserProcessAlloy::GetTabManager() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2015-10-09 17:23:12 +02:00
|
|
|
}
|
2016-08-04 14:37:53 +02:00
|
|
|
|
2018-11-30 23:21:07 +01:00
|
|
|
resource_coordinator::ResourceCoordinatorParts*
|
2020-06-28 20:29:44 +02:00
|
|
|
ChromeBrowserProcessAlloy::resource_coordinator_parts() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2018-11-30 23:21:07 +01:00
|
|
|
}
|
2020-03-30 22:13:42 +02:00
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
BuildState* ChromeBrowserProcessAlloy::GetBuildState() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2020-03-30 22:13:42 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
2021-07-23 18:40:13 +02:00
|
|
|
|
|
|
|
SerialPolicyAllowedPorts*
|
|
|
|
ChromeBrowserProcessAlloy::serial_policy_allowed_ports() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2021-07-23 18:40:13 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
2021-09-20 11:06:23 +02:00
|
|
|
|
2022-02-21 23:23:40 +01:00
|
|
|
HidPolicyAllowedDevices*
|
|
|
|
ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2022-02-21 23:23:40 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2023-01-03 00:34:43 +01:00
|
|
|
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
|
2023-05-08 17:19:38 +02:00
|
|
|
DCHECK(false);
|
2023-01-03 00:34:43 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|