#include "components/content_settings/browser/content_settings_manager_impl.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/task/thread_pool.h"
#include "components/content_settings/browser/page_specific_content_settings.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/cookie_settings_base.h"
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_features.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/base/features.h"
#include "net/cookies/cookie_util.h"
#include "net/cookies/site_for_cookies.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
PageSpecificContentSettings;
namespace content_settings {
namespace {
StorageType;
void OnStorageAccessed(const content::GlobalRenderFrameHostToken& frame_token,
const GURL& origin_url,
const GURL& top_origin_url,
bool blocked_by_policy,
page_load_metrics::StorageType storage_type) { … }
void NotifyStorageAccess(const content::GlobalRenderFrameHostToken& frame_token,
StorageType storage_type,
const url::Origin& top_frame_origin,
bool allowed) { … }
void OnContentBlockedOnUI(
const content::GlobalRenderFrameHostToken& frame_token,
ContentSettingsType type) { … }
}
ContentSettingsManagerImpl::~ContentSettingsManagerImpl() = default;
void ContentSettingsManagerImpl::Create(
content::RenderProcessHost* render_process_host,
mojo::PendingReceiver<content_settings::mojom::ContentSettingsManager>
receiver,
std::unique_ptr<Delegate> delegate) { … }
void ContentSettingsManagerImpl::Clone(
mojo::PendingReceiver<content_settings::mojom::ContentSettingsManager>
receiver) { … }
void ContentSettingsManagerImpl::AllowStorageAccess(
const blink::LocalFrameToken& frame_token,
StorageType storage_type,
const url::Origin& origin,
const net::SiteForCookies& site_for_cookies,
const url::Origin& top_frame_origin,
base::OnceCallback<void(bool)> callback) { … }
void ContentSettingsManagerImpl::OnContentBlocked(
const blink::LocalFrameToken& frame_token,
ContentSettingsType type) { … }
ContentSettingsManagerImpl::ContentSettingsManagerImpl(
int render_process_id,
std::unique_ptr<Delegate> delegate,
scoped_refptr<CookieSettings> cookie_settings)
: … { … }
ContentSettingsManagerImpl::ContentSettingsManagerImpl(
const ContentSettingsManagerImpl& other)
: … { … }
void ContentSettingsManagerImpl::CreateOnThread(
int render_process_id,
mojo::PendingReceiver<content_settings::mojom::ContentSettingsManager>
receiver,
scoped_refptr<CookieSettings> cookie_settings,
std::unique_ptr<Delegate> delegate) { … }
}