#include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h"
#include <memory>
#include "components/content_settings/core/browser/content_settings_rule.h"
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "extensions/common/extension_id.h"
namespace content_settings {
CustomExtensionProvider::CustomExtensionProvider(
const scoped_refptr<extensions::ContentSettingsStore>& extensions_settings,
bool incognito)
: … { … }
CustomExtensionProvider::~CustomExtensionProvider() = default;
std::unique_ptr<RuleIterator> CustomExtensionProvider::GetRuleIterator(
ContentSettingsType content_type,
bool incognito,
const content_settings::PartitionKey& partition_key) const { … }
std::unique_ptr<content_settings::Rule> CustomExtensionProvider::GetRule(
const GURL& primary_url,
const GURL& secondary_url,
ContentSettingsType content_type,
bool off_the_record,
const content_settings::PartitionKey& partition_key) const { … }
bool CustomExtensionProvider::SetWebsiteSetting(
const ContentSettingsPattern& primary_pattern,
const ContentSettingsPattern& secondary_pattern,
ContentSettingsType content_type,
base::Value&& value,
const ContentSettingConstraints& constraints,
const content_settings::PartitionKey& partition_key) { … }
void CustomExtensionProvider::ShutdownOnUIThread() { … }
void CustomExtensionProvider::OnContentSettingChanged(
const extensions::ExtensionId& extension_id,
bool incognito) { … }
}