#include "ui/webui/webui_allowlist.h"
#include <memory>
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/supports_user_data.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
#include "ui/webui/webui_allowlist_provider.h"
#include "url/gurl.h"
const char kWebUIAllowlistKeyName[] = …;
namespace {
struct WebUIAllowlistHolder : base::SupportsUserData::Data { … };
}
WebUIAllowlist* WebUIAllowlist::GetOrCreate(
content::BrowserContext* browser_context) { … }
WebUIAllowlist::WebUIAllowlist() = default;
WebUIAllowlist::~WebUIAllowlist() = default;
void WebUIAllowlist::RegisterAutoGrantedPermission(const url::Origin& origin,
ContentSettingsType type,
ContentSetting setting) { … }
void WebUIAllowlist::RegisterAutoGrantedPermissions(
const url::Origin& origin,
std::initializer_list<ContentSettingsType> types) { … }
void WebUIAllowlist::RegisterAutoGrantedThirdPartyCookies(
const url::Origin& top_level_origin,
const std::vector<ContentSettingsPattern>& origin_patterns) { … }
void WebUIAllowlist::SetWebUIAllowlistProvider(
WebUIAllowlistProvider* provider) { … }
void WebUIAllowlist::ResetWebUIAllowlistProvider() { … }
std::unique_ptr<content_settings::RuleIterator> WebUIAllowlist::GetRuleIterator(
ContentSettingsType content_type) const { … }
std::unique_ptr<content_settings::Rule> WebUIAllowlist::GetRule(
const GURL& primary_url,
const GURL& secondary_url,
ContentSettingsType content_type) const { … }
void WebUIAllowlist::SetContentSettingsAndNotifyProvider(
const ContentSettingsPattern& primary_pattern,
const ContentSettingsPattern& secondary_pattern,
ContentSettingsType type,
ContentSetting setting) { … }