#include "chrome/browser/extensions/extension_service_test_with_install.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/load_error_reporter.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/extension_creator.h"
#include "extensions/common/verifier_formats.h"
#include "testing/gtest/include/gtest/gtest.h"
ManifestLocation;
namespace extensions {
namespace {
struct ExtensionsOrder { … };
}
ExtensionServiceTestWithInstall::ExtensionServiceTestWithInstall()
: … { … }
ExtensionServiceTestWithInstall::ExtensionServiceTestWithInstall(
std::unique_ptr<content::BrowserTaskEnvironment> task_environment)
: … { … }
ExtensionServiceTestWithInstall::~ExtensionServiceTestWithInstall() { … }
void ExtensionServiceTestWithInstall::InitializeExtensionService(
ExtensionServiceInitParams params) { … }
std::vector<std::u16string> ExtensionServiceTestWithInstall::GetErrors() { … }
void ExtensionServiceTestWithInstall::PackCRX(const base::FilePath& dir_path,
const base::FilePath& pem_path,
const base::FilePath& crx_path) { … }
const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX(
const base::FilePath& dir_path,
const base::FilePath& pem_path,
InstallState install_state,
int creation_flags,
ManifestLocation install_location) { … }
const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX(
const base::FilePath& dir_path,
const base::FilePath& pem_path,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX(
const base::FilePath& dir_path,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX(
const base::FilePath& dir_path,
ManifestLocation install_location,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::InstallCRX(
const base::FilePath& path,
InstallState install_state,
int creation_flags,
const std::string& expected_old_name) { … }
const Extension* ExtensionServiceTestWithInstall::InstallCRX(
const base::FilePath& path,
ManifestLocation install_location,
InstallState install_state,
int creation_flags) { … }
const Extension* ExtensionServiceTestWithInstall::InstallCRX(
const base::FilePath& path,
InstallState install_state,
int creation_flags) { … }
const Extension* ExtensionServiceTestWithInstall::InstallCRX(
const base::FilePath& path,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::InstallCRXFromWebStore(
const base::FilePath& path,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::VerifyCrxInstall(
const base::FilePath& path,
InstallState install_state) { … }
const Extension* ExtensionServiceTestWithInstall::VerifyCrxInstall(
const base::FilePath& path,
InstallState install_state,
const std::string& expected_old_name) { … }
void ExtensionServiceTestWithInstall::PackCRXAndUpdateExtension(
const std::string& id,
const base::FilePath& dir_path,
const base::FilePath& pem_path,
UpdateState expected_state) { … }
void ExtensionServiceTestWithInstall::UpdateExtension(
const std::string& id,
const base::FilePath& in_path,
UpdateState expected_state) { … }
void ExtensionServiceTestWithInstall::UninstallExtension(
const std::string& id,
UninstallExtensionFileDeleteType delete_type) { … }
void ExtensionServiceTestWithInstall::TerminateExtension(
const std::string& id) { … }
void ExtensionServiceTestWithInstall::BlockAllExtensions() { … }
void ExtensionServiceTestWithInstall::ClearLoadedExtensions() { … }
void ExtensionServiceTestWithInstall::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) { … }
void ExtensionServiceTestWithInstall::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionReason reason) { … }
void ExtensionServiceTestWithInstall::OnExtensionWillBeInstalled(
content::BrowserContext* browser_context,
const Extension* extension,
bool is_update,
const std::string& old_name) { … }
void ExtensionServiceTestWithInstall::InstallCRXInternal(
const base::FilePath& crx_path,
ManifestLocation install_location,
InstallState install_state,
int creation_flags) { … }
}