chromium/extensions/browser/api/declarative/rules_cache_delegate.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 "extensions/browser/api/declarative/rules_cache_delegate.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/observer_list.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/api/declarative/rules_registry.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/state_store.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/permissions/permissions_data.h"

namespace {

// Returns the key to use for storing declarative rules in the state store.
std::string GetDeclarativeRuleStorageKey(const std::string& event_name,
                                         bool incognito) {}


}  // namespace

namespace extensions {

// RulesCacheDelegate

const char RulesCacheDelegate::kRulesStoredKey[] =;

RulesCacheDelegate::RulesCacheDelegate(Type type)
    :{}

RulesCacheDelegate::~RulesCacheDelegate() = default;

// Returns the key to use for storing whether the rules have been stored.
// static
std::string RulesCacheDelegate::GetRulesStoredKey(const std::string& event_name,
                                                  bool incognito) {}

// This is called from the constructor of RulesRegistry, so it is
// important that it both
// 1. calls no (in particular virtual) methods of the rules registry, and
// 2. does not create scoped_refptr holding the registry. (A short-lived
// scoped_refptr might delete the rules registry before it is constructed.)
void RulesCacheDelegate::Init(RulesRegistry* registry) {}

void RulesCacheDelegate::UpdateRules(const ExtensionId& extension_id,
                                     base::Value::List value) {}

bool RulesCacheDelegate::HasRules() const {}

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

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

void RulesCacheDelegate::CheckIfReady() {}

void RulesCacheDelegate::ReadRulesForInstalledExtensions() {}

void RulesCacheDelegate::ReadFromStorage(const ExtensionId& extension_id) {}

void RulesCacheDelegate::ReadFromStorageCallback(
    const ExtensionId& extension_id,
    std::optional<base::Value> value) {}

bool RulesCacheDelegate::GetDeclarativeRulesStored(
    const ExtensionId& extension_id) const {}

void RulesCacheDelegate::SetDeclarativeRulesStored(
    const ExtensionId& extension_id,
    bool rules_stored) {}

}  // namespace extensions