#include "chrome/browser/extensions/startup_helper.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ref.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/initialize_extensions_client.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_file_task_runner.h"
#include "extensions/browser/sandboxed_unpacker.h"
#include "extensions/common/extension.h"
#include "extensions/common/verifier_formats.h"
BrowserThread;
namespace extensions {
namespace {
void PrintPackExtensionMessage(const std::string& message) { … }
}
StartupHelper::StartupHelper() { … }
StartupHelper::~StartupHelper() = default;
void StartupHelper::OnPackSuccess(
const base::FilePath& crx_path,
const base::FilePath& output_private_key_path) { … }
void StartupHelper::OnPackFailure(const std::string& error_message,
ExtensionCreator::ErrorType type) { … }
bool StartupHelper::PackExtension(const base::CommandLine& cmd_line,
std::string* error) { … }
namespace {
class ValidateCrxHelper : public SandboxedUnpackerClient { … };
}
bool StartupHelper::ValidateCrx(const base::CommandLine& cmd_line,
std::string* error) { … }
}