chromium/chrome/browser/extensions/extension_allowlist.cc

// Copyright 2020 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/extension_allowlist.h"

#include "base/metrics/histogram_functions.h"
#include "base/observer_list.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h"
#include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "extensions/browser/allowlist_state.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"

namespace extensions {

namespace {

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class ExtensionAllowlistOmahaAttributeValue {};

void ReportExtensionAllowlistOmahaAttribute(
    const base::Value* allowlist_value) {}

// Indicates whether an extension is included in the Safe Browsing allowlist.
constexpr PrefMap kPrefAllowlist =;

// Indicates the enforcement acknowledge state for the Safe Browsing allowlist.
constexpr PrefMap kPrefAllowlistAcknowledge =;

}  // namespace

ExtensionAllowlist::ExtensionAllowlist(Profile* profile,
                                       ExtensionPrefs* extension_prefs,
                                       ExtensionService* extension_service)
    :{}

ExtensionAllowlist::~ExtensionAllowlist() = default;

void ExtensionAllowlist::AddObserver(Observer* observer) {}

void ExtensionAllowlist::RemoveObserver(Observer* observer) {}

void ExtensionAllowlist::Init() {}

AllowlistState ExtensionAllowlist::GetExtensionAllowlistState(
    const ExtensionId& extension_id) const {}

void ExtensionAllowlist::SetExtensionAllowlistState(
    const ExtensionId& extension_id,
    AllowlistState state) {}

AllowlistAcknowledgeState
ExtensionAllowlist::GetExtensionAllowlistAcknowledgeState(
    const ExtensionId& extension_id) const {}

void ExtensionAllowlist::SetExtensionAllowlistAcknowledgeState(
    const ExtensionId& extension_id,
    AllowlistAcknowledgeState state) {}

void ExtensionAllowlist::PerformActionBasedOnOmahaAttributes(
    const ExtensionId& extension_id,
    const base::Value::Dict& attributes) {}

bool ExtensionAllowlist::ShouldDisplayWarning(
    const ExtensionId& extension_id) const {}

void ExtensionAllowlist::OnExtensionInstalled(const ExtensionId& extension_id,
                                              int install_flags) {}

void ExtensionAllowlist::SetAllowlistEnforcementFields() {}

// `ApplyEnforcement` can be called when an extension becomes not allowlisted or
// when the allowlist enforcement is activated (for already not allowlisted
// extensions).
void ExtensionAllowlist::ApplyEnforcement(const ExtensionId& extension_id) {}

void ExtensionAllowlist::ActivateAllowlistEnforcement() {}

void ExtensionAllowlist::DeactivateAllowlistEnforcement() {}

void ExtensionAllowlist::OnSafeBrowsingEnhancedChanged() {}

// ExtensionPrefsObserver::OnExtensionStateChanged override
void ExtensionAllowlist::OnExtensionStateChanged(
    const ExtensionId& extension_id,
    bool is_now_enabled) {}

void ExtensionAllowlist::NotifyExtensionAllowlistWarningStateChanged(
    const ExtensionId& extension_id,
    bool show_warning) {}

void ExtensionAllowlist::ReportExtensionReEnabledEvent() {}

}  // namespace extensions