chromium/extensions/browser/api/declarative_net_request/prefs_helper.h

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

#ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_PREFS_HELPER_H_
#define EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_PREFS_HELPER_H_

#include <optional>
#include <set>
#include <vector>

#include "base/containers/flat_set.h"
#include "base/memory/raw_ref.h"
#include "base/values.h"
#include "extensions/common/api/declarative_net_request/constants.h"
#include "extensions/common/extension_id.h"

namespace extensions {
class ExtensionPrefs;

namespace declarative_net_request {

// ExtensionPrefs helper class for DeclarativeNetRequest.
// This class is stateless, as it is intended to provides one-off operations
// that hits ExtensionPrefs whenever DeclarativeNetRequest preference value
// is fetched or set.
// If any performance issues are noticed, we could look into optimizing this
// class to keep a bit more state. (e.g. keeping disabled static rule count
// and updating it whenever UpdateDisabledStaticRules() is called, so that
// GetDisabledStaticRuleCount() doesn't hit ExtensionPrefs to calculate the
// size each time)
class PrefsHelper {};

}  // namespace declarative_net_request
}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_PREFS_HELPER_H_