chromium/extensions/browser/api/content_settings/content_settings_store.cc

// Copyright 2012 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/content_settings/content_settings_store.h"

#include <memory>
#include <set>
#include <string>
#include <utility>

#include "base/check_op.h"
#include "base/debug/alias.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "components/content_settings/core/browser/content_settings_info.h"
#include "components/content_settings/core/browser/content_settings_origin_value_map.h"
#include "components/content_settings/core/browser/content_settings_registry.h"
#include "components/content_settings/core/browser/content_settings_rule.h"
#include "components/content_settings/core/browser/content_settings_uma_util.h"
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/browser/website_settings_info.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/content_settings/core/common/content_settings_utils.h"
#include "components/permissions/features.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/api/content_settings/content_settings_helpers.h"
#include "extensions/common/api/types.h"
#include "extensions/common/extension_id.h"
#include "url/gurl.h"

BrowserThread;
ConcatenationIterator;
OriginValueMap;
Rule;
RuleIterator;

namespace extensions {

struct ContentSettingsStore::ExtensionEntry {};

ContentSettingsStore::ContentSettingsStore() {}

ContentSettingsStore::~ContentSettingsStore() = default;

constexpr char ContentSettingsStore::kContentSettingKey[];
constexpr char ContentSettingsStore::kContentSettingsTypeKey[];
constexpr char ContentSettingsStore::kPrimaryPatternKey[];
constexpr char ContentSettingsStore::kSecondaryPatternKey[];

std::unique_ptr<RuleIterator> ContentSettingsStore::GetRuleIterator(
    ContentSettingsType type,
    bool incognito) const {}

std::unique_ptr<content_settings::Rule> ContentSettingsStore::GetRule(
    const GURL& primary_url,
    const GURL& secondary_url,
    ContentSettingsType content_type,
    bool off_the_record) const {}

void ContentSettingsStore::SetExtensionContentSetting(
    const std::string& ext_id,
    const ContentSettingsPattern& primary_pattern,
    const ContentSettingsPattern& secondary_pattern,
    ContentSettingsType type,
    ContentSetting setting,
    ChromeSettingScope scope) {}

void ContentSettingsStore::RegisterExtension(
    const std::string& ext_id,
    const base::Time& install_time,
    bool is_enabled) {}

void ContentSettingsStore::UnregisterExtension(
    const std::string& ext_id) {}

void ContentSettingsStore::ShouldNotifyForEntry(const ExtensionEntry& entry,
                                                bool* notify,
                                                bool* notify_incognito) {}

void ContentSettingsStore::SetExtensionState(
    const std::string& ext_id, bool is_enabled) {}

OriginValueMap* ContentSettingsStore::GetValueMap(const std::string& ext_id,
                                                  ChromeSettingScope scope) {}

const OriginValueMap* ContentSettingsStore::GetValueMap(
    const std::string& ext_id,
    ChromeSettingScope scope) const {}

void ContentSettingsStore::ClearContentSettingsForExtension(
    const std::string& ext_id,
    ChromeSettingScope scope) {}

void ContentSettingsStore::ClearContentSettingsForExtensionAndContentType(
    const std::string& ext_id,
    ChromeSettingScope scope,
    ContentSettingsType content_type) {}

base::Value::List ContentSettingsStore::GetSettingsForExtension(
    const ExtensionId& extension_id,
    ChromeSettingScope scope) const {}

#define LOG_INVALID_EXTENSION_PREFERENCE_DETAILS

void ContentSettingsStore::SetExtensionContentSettingFromList(
    const ExtensionId& extension_id,
    const base::Value::List& list,
    ChromeSettingScope scope) {}

#undef LOG_INVALID_EXTENSION_PREFERENCE_DETAILS

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

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

void ContentSettingsStore::NotifyOfContentSettingChanged(
    const ExtensionId& extension_id,
    bool incognito) {}

bool ContentSettingsStore::OnCorrectThread() {}

ContentSettingsStore::ExtensionEntry* ContentSettingsStore::FindEntry(
    const std::string& ext_id) const {}

ContentSettingsStore::ExtensionEntries::iterator
ContentSettingsStore::FindIterator(const std::string& ext_id) {}

}  // namespace extensions