#include "extensions/shell/browser/shell_extension_system.h"
#include <memory>
#include <string>
#include "apps/launcher.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "components/value_store/value_store_factory_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/api/app_runtime/app_runtime_api.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/null_app_sorting.h"
#include "extensions/browser/quota_service.h"
#include "extensions/browser/service_worker_manager.h"
#include "extensions/browser/user_script_manager.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/file_util.h"
#include "extensions/shell/browser/shell_extension_loader.h"
BrowserContext;
namespace extensions {
ShellExtensionSystem::ShellExtensionSystem(BrowserContext* browser_context)
: … { … }
ShellExtensionSystem::~ShellExtensionSystem() = default;
const Extension* ShellExtensionSystem::LoadExtension(
const base::FilePath& extension_dir) { … }
const Extension* ShellExtensionSystem::LoadApp(const base::FilePath& app_dir) { … }
void ShellExtensionSystem::FinishInitialization() { … }
void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) { … }
void ShellExtensionSystem::ReloadExtension(const ExtensionId& extension_id) { … }
void ShellExtensionSystem::Shutdown() { … }
void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { … }
ExtensionService* ShellExtensionSystem::extension_service() { … }
ManagementPolicy* ShellExtensionSystem::management_policy() { … }
ServiceWorkerManager* ShellExtensionSystem::service_worker_manager() { … }
UserScriptManager* ShellExtensionSystem::user_script_manager() { … }
StateStore* ShellExtensionSystem::state_store() { … }
StateStore* ShellExtensionSystem::rules_store() { … }
StateStore* ShellExtensionSystem::dynamic_user_scripts_store() { … }
scoped_refptr<value_store::ValueStoreFactory>
ShellExtensionSystem::store_factory() { … }
QuotaService* ShellExtensionSystem::quota_service() { … }
AppSorting* ShellExtensionSystem::app_sorting() { … }
const base::OneShotEvent& ShellExtensionSystem::ready() const { … }
bool ShellExtensionSystem::is_ready() const { … }
ContentVerifier* ShellExtensionSystem::content_verifier() { … }
std::unique_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions(
const Extension* extension) { … }
void ShellExtensionSystem::InstallUpdate(
const ExtensionId& extension_id,
const std::string& public_key,
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) { … }
void ShellExtensionSystem::PerformActionBasedOnOmahaAttributes(
const ExtensionId& extension_id,
const base::Value::Dict& attributes) { … }
bool ShellExtensionSystem::FinishDelayedInstallationIfReady(
const ExtensionId& extension_id,
bool install_immediately) { … }
}