chromium/chrome/browser/extensions/extension_system_impl.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/extension_system_impl.h"

#include <algorithm>
#include <memory>

#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_tokenizer.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_app_sorting.h"
#include "chrome/browser/extensions/chrome_content_verifier_delegate.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_garbage_collector.h"
#include "chrome/browser/extensions/extension_management.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_sync_service.h"
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/extensions/install_verifier.h"
#include "chrome/browser/extensions/load_error_reporter.h"
#include "chrome/browser/extensions/shared_module_service.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/update_install_gate.h"
#include "chrome/browser/notifications/notifier_state_tracker.h"
#include "chrome/browser/notifications/notifier_state_tracker_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/browser/ui/webui/extensions/extensions_internals_source.h"
#include "chrome/common/chrome_switches.h"
#include "components/value_store/value_store_factory_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/url_data_source.h"
#include "extensions/browser/content_verifier/content_verifier.h"
#include "extensions/browser/extension_pref_store.h"
#include "extensions/browser/extension_pref_value_map.h"
#include "extensions/browser/extension_pref_value_map_factory.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/quota_service.h"
#include "extensions/browser/service_worker_manager.h"
#include "extensions/browser/state_store.h"
#include "extensions/browser/updater/uninstall_ping_sender.h"
#include "extensions/browser/user_script_manager.h"
#include "extensions/common/constants.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/manifest_url_handlers.h"
#include "ui/message_center/public/cpp/notifier_id.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_switches.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/ash/app_mode/kiosk_app_update_install_gate.h"
#include "chrome/browser/ash/extensions/device_local_account_management_policy_provider.h"
#include "chrome/browser/ash/extensions/extensions_permissions_tracker.h"
#include "chrome/browser/ash/extensions/signin_screen_policy_provider.h"
#include "chrome/browser/ash/policy/core/device_local_account.h"
#include "chrome/browser/ash/profiles/profile_helper.h"
#include "chromeos/ash/components/login/login_state/login_state.h"
#include "chromeos/components/mgs/managed_guest_session_utils.h"
#include "components/user_manager/user_manager.h"
#endif

namespace extensions {

namespace {

// Helper to serve as an UninstallPingSender::Filter callback.
UninstallPingSender::FilterResult ShouldSendUninstallPing(
    Profile* profile,
    const Extension* extension,
    UninstallReason reason) {}

}  // namespace

//
// ExtensionSystemImpl::Shared
//

ExtensionSystemImpl::Shared::Shared(Profile* profile) :{}

ExtensionSystemImpl::Shared::~Shared() = default;

void ExtensionSystemImpl::Shared::InitPrefs() {}

void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() {}

void ExtensionSystemImpl::Shared::InitInstallGates() {}

void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {}

void ExtensionSystemImpl::Shared::Shutdown() {}

ServiceWorkerManager* ExtensionSystemImpl::Shared::service_worker_manager() {}

StateStore* ExtensionSystemImpl::Shared::state_store() {}

StateStore* ExtensionSystemImpl::Shared::rules_store() {}

StateStore* ExtensionSystemImpl::Shared::dynamic_user_scripts_store() {}

scoped_refptr<value_store::ValueStoreFactory>
ExtensionSystemImpl::Shared::store_factory() const {}

ExtensionService* ExtensionSystemImpl::Shared::extension_service() {}

ManagementPolicy* ExtensionSystemImpl::Shared::management_policy() {}

UserScriptManager* ExtensionSystemImpl::Shared::user_script_manager() {}

QuotaService* ExtensionSystemImpl::Shared::quota_service() {}

AppSorting* ExtensionSystemImpl::Shared::app_sorting() {}

ContentVerifier* ExtensionSystemImpl::Shared::content_verifier() {}

//
// ExtensionSystemImpl
//

ExtensionSystemImpl::ExtensionSystemImpl(Profile* profile) :{}

ExtensionSystemImpl::~ExtensionSystemImpl() = default;

void ExtensionSystemImpl::Shutdown() {}

void ExtensionSystemImpl::InitForRegularProfile(bool extensions_enabled) {}

ExtensionService* ExtensionSystemImpl::extension_service() {}

ManagementPolicy* ExtensionSystemImpl::management_policy() {}

ServiceWorkerManager* ExtensionSystemImpl::service_worker_manager() {}

UserScriptManager* ExtensionSystemImpl::user_script_manager() {}

StateStore* ExtensionSystemImpl::state_store() {}

StateStore* ExtensionSystemImpl::rules_store() {}

StateStore* ExtensionSystemImpl::dynamic_user_scripts_store() {}

scoped_refptr<value_store::ValueStoreFactory>
ExtensionSystemImpl::store_factory() {}

const base::OneShotEvent& ExtensionSystemImpl::ready() const {}

bool ExtensionSystemImpl::is_ready() const {}

QuotaService* ExtensionSystemImpl::quota_service() {}

AppSorting* ExtensionSystemImpl::app_sorting() {}

ContentVerifier* ExtensionSystemImpl::content_verifier() {}

std::unique_ptr<ExtensionSet> ExtensionSystemImpl::GetDependentExtensions(
    const Extension* extension) {}

void ExtensionSystemImpl::InstallUpdate(
    const std::string& extension_id,
    const std::string& public_key,
    const base::FilePath& unpacked_dir,
    bool install_immediately,
    InstallUpdateCallback install_update_callback) {}

void ExtensionSystemImpl::PerformActionBasedOnOmahaAttributes(
    const std::string& extension_id,
    const base::Value::Dict& attributes) {}

bool ExtensionSystemImpl::FinishDelayedInstallationIfReady(
    const std::string& extension_id,
    bool install_immediately) {}

}  // namespace extensions