chromium/chrome/browser/extensions/install_verifier.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/install_verifier.h"

#include <algorithm>
#include <string>
#include <utility>

#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/one_shot_event.h"
#include "base/ranges/algorithm.h"
#include "base/stl_util.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_management.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/install_signer.h"
#include "chrome/browser/extensions/install_verifier_factory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_url_handlers.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "ui/base/l10n/l10n_util.h"

namespace extensions {

namespace {

// This should only be set during tests.
ScopedInstallVerifierBypassForTest::ForceType* g_bypass_for_test =;

enum class VerifyStatus {};

VerifyStatus GetExperimentStatus() {}

VerifyStatus GetCommandLineStatus() {}

VerifyStatus GetStatus() {}

bool ShouldFetchSignature() {}

bool CanUseExtensionApis(const Extension& extension) {}

}  // namespace

InstallVerifier::InstallVerifier(ExtensionPrefs* prefs,
                                 content::BrowserContext* context)
    :{}

InstallVerifier::~InstallVerifier() = default;

// static
InstallVerifier* InstallVerifier::Get(
    content::BrowserContext* browser_context) {}

// static
bool InstallVerifier::ShouldEnforce() {}

// static
bool InstallVerifier::NeedsVerification(const Extension& extension,
                                        content::BrowserContext* context) {}

// static
bool InstallVerifier::IsFromStore(const Extension& extension,
                                  content::BrowserContext* context) {}

void InstallVerifier::Init() {}

void InstallVerifier::VerifyAllExtensions() {}

base::Time InstallVerifier::SignatureTimestamp() {}

bool InstallVerifier::IsKnownId(const std::string& id) const {}

bool InstallVerifier::IsInvalid(const std::string& id) const {}

void InstallVerifier::VerifyExtension(const std::string& extension_id) {}

void InstallVerifier::AddMany(const ExtensionIdSet& ids, OperationType type) {}

void InstallVerifier::AddProvisional(const ExtensionIdSet& ids) {}

void InstallVerifier::Remove(const std::string& id) {}

void InstallVerifier::RemoveMany(const ExtensionIdSet& ids) {}

bool InstallVerifier::AllowedByEnterprisePolicy(const std::string& id) const {}

std::string InstallVerifier::GetDebugPolicyProviderName() const {}

bool InstallVerifier::MustRemainDisabled(const Extension* extension,
                                         disable_reason::DisableReason* reason,
                                         std::u16string* error) const {}

InstallVerifier::PendingOperation::PendingOperation(OperationType type)
    :{}

InstallVerifier::PendingOperation::~PendingOperation() = default;

ExtensionIdSet InstallVerifier::GetExtensionsToVerify() const {}

void InstallVerifier::MaybeBootstrapSelf() {}

void InstallVerifier::OnVerificationComplete(bool success, OperationType type) {}

void InstallVerifier::GarbageCollect() {}

bool InstallVerifier::IsVerified(const std::string& id) const {}

void InstallVerifier::BeginFetch() {}

void InstallVerifier::SaveToPrefs() {}

void InstallVerifier::SignatureCallback(
    std::unique_ptr<InstallSignature> signature) {}

ScopedInstallVerifierBypassForTest::ScopedInstallVerifierBypassForTest(
    ForceType force_type)
    :{}

ScopedInstallVerifierBypassForTest::~ScopedInstallVerifierBypassForTest() {}

}  // namespace extensions