#include "chrome/browser/extensions/webstore_standalone_installer.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "base/version.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/install_tracker.h"
#include "chrome/browser/extensions/scoped_active_install.h"
#include "chrome/browser/extensions/webstore_data_fetcher.h"
#include "chrome/browser/profiles/profile.h"
#include "components/crx_file/id_util.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_urls.h"
#include "url/gurl.h"
WebContents;
namespace {
constexpr char kProfileShuttingDown[] = …;
}
namespace extensions {
WebstoreStandaloneInstaller::WebstoreStandaloneInstaller(
const std::string& webstore_item_id,
Profile* profile,
Callback callback)
: … { … }
void WebstoreStandaloneInstaller::BeginInstall() { … }
WebstoreStandaloneInstaller::~WebstoreStandaloneInstaller() { … }
void WebstoreStandaloneInstaller::RunCallback(bool success,
const std::string& error,
webstore_install::Result result) { … }
void WebstoreStandaloneInstaller::AbortInstall() { … }
bool WebstoreStandaloneInstaller::EnsureUniqueInstall(
webstore_install::Result* reason,
std::string* error) { … }
void WebstoreStandaloneInstaller::CompleteInstall(
webstore_install::Result result,
const std::string& error) { … }
void WebstoreStandaloneInstaller::ProceedWithInstallPrompt() { … }
scoped_refptr<const Extension>
WebstoreStandaloneInstaller::GetLocalizedExtensionForDisplay() { … }
void WebstoreStandaloneInstaller::OnManifestParsed() { … }
std::unique_ptr<ExtensionInstallPrompt>
WebstoreStandaloneInstaller::CreateInstallUI() { … }
std::unique_ptr<WebstoreInstaller::Approval>
WebstoreStandaloneInstaller::CreateApproval() const { … }
void WebstoreStandaloneInstaller::OnInstallPromptDone(
ExtensionInstallPrompt::DoneCallbackPayload payload) { … }
void WebstoreStandaloneInstaller::OnWebstoreRequestFailure(
const std::string& extension_id) { … }
void WebstoreStandaloneInstaller::OnWebstoreItemJSONAPIResponseParseSuccess(
const std::string& extension_id,
const base::Value::Dict& webstore_data) { … }
void WebstoreStandaloneInstaller::OnFetchItemSnippetParseSuccess(
const std::string& extension_id,
FetchItemSnippetResponse item_snippet) { … }
void WebstoreStandaloneInstaller::OnWebstoreResponseParseFailure(
const std::string& extension_id,
const std::string& error) { … }
void WebstoreStandaloneInstaller::OnWebstoreParseSuccess(
const std::string& id,
const SkBitmap& icon,
base::Value::Dict manifest) { … }
void WebstoreStandaloneInstaller::OnWebstoreParseFailure(
const std::string& id,
InstallHelperResultCode result_code,
const std::string& error_message) { … }
void WebstoreStandaloneInstaller::OnExtensionInstallSuccess(
const std::string& id) { … }
void WebstoreStandaloneInstaller::OnExtensionInstallFailure(
const std::string& id,
const std::string& error,
WebstoreInstaller::FailureReason reason) { … }
void WebstoreStandaloneInstaller::OnProfileWillBeDestroyed(Profile* profile) { … }
void WebstoreStandaloneInstaller::ShowInstallUI() { … }
void WebstoreStandaloneInstaller::OnWebStoreDataFetcherDone() { … }
void WebstoreStandaloneInstaller::CleanUp() { … }
}