#include "extensions/shell/browser/shell_extension_loader.h"
#include "apps/launcher.h"
#include "base/auto_reset.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/task/sequenced_task_runner.h"
#include "extensions/browser/extension_file_task_runner.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/file_util.h"
namespace extensions {
LoadErrorBehavior;
namespace {
scoped_refptr<const Extension> LoadUnpacked(
const base::FilePath& extension_dir) { … }
}
ShellExtensionLoader::ShellExtensionLoader(
content::BrowserContext* browser_context)
: … { … }
ShellExtensionLoader::~ShellExtensionLoader() = default;
const Extension* ShellExtensionLoader::LoadExtension(
const base::FilePath& extension_dir) { … }
void ShellExtensionLoader::ReloadExtension(ExtensionId extension_id) { … }
void ShellExtensionLoader::FinishExtensionReload(
const ExtensionId old_extension_id,
scoped_refptr<const Extension> extension) { … }
void ShellExtensionLoader::PreAddExtension(const Extension* extension,
const Extension* old_extension) { … }
void ShellExtensionLoader::PostActivateExtension(
scoped_refptr<const Extension> extension) { … }
void ShellExtensionLoader::PostDeactivateExtension(
scoped_refptr<const Extension> extension) { … }
void ShellExtensionLoader::LoadExtensionForReload(
const ExtensionId& extension_id,
const base::FilePath& path,
LoadErrorBehavior load_error_behavior) { … }
bool ShellExtensionLoader::CanEnableExtension(const Extension* extension) { … }
bool ShellExtensionLoader::CanDisableExtension(const Extension* extension) { … }
bool ShellExtensionLoader::ShouldBlockExtension(const Extension* extension) { … }
}