From 676f74f3dc2ce6a13eb9be8a813a8fc42fcdaa75 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 15 Mar 2021 21:45:19 -0400 Subject: [PATCH] 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer. https://chromium-review.googlesource.com/c/chromium/src/+/2651385 --- shell/browser/electron_browser_context.cc | 28 ----------------------- shell/browser/electron_browser_context.h | 12 ---------- 2 files changed, 40 deletions(-) diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 2f48d7f2e86d..97b4cc29b4f7 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -433,34 +433,6 @@ ElectronBrowserContext::GetStorageNotificationService() { return nullptr; } -void ElectronBrowserContext::SetCorsOriginAccessListForOrigin( - TargetBrowserContexts target_mode, - const url::Origin& source_origin, - std::vector allow_patterns, - std::vector block_patterns, - base::OnceClosure closure) { - using content::CorsOriginPatternSetter; - // We ignore target_mode because we don't support extensions in in-memory - // sessions. - auto barrier_closure = BarrierClosure(2, std::move(closure)); - base::MakeRefCounted( - source_origin, CorsOriginPatternSetter::ClonePatterns(allow_patterns), - CorsOriginPatternSetter::ClonePatterns(block_patterns), barrier_closure) - ->ApplyToEachStoragePartition(this); - - // Keep the per-profile access list up to date so that we can use this to - // restore NetworkContext settings at anytime, e.g. on restarting the - // network service. - shared_cors_origin_access_list_->SetForOrigin( - source_origin, std::move(allow_patterns), std::move(block_patterns), - barrier_closure); -} - -content::SharedCorsOriginAccessList* -ElectronBrowserContext::GetSharedCorsOriginAccessList() { - return shared_cors_origin_access_list_.get(); -} - ResolveProxyHelper* ElectronBrowserContext::GetResolveProxyHelper() { if (!resolve_proxy_helper_) { resolve_proxy_helper_ = base::MakeRefCounted(this); diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index 1a55d7191cc8..1db419e0451b 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -113,15 +113,6 @@ class ElectronBrowserContext override; content::StorageNotificationService* GetStorageNotificationService() override; - // extensions deps - void SetCorsOriginAccessListForOrigin( - TargetBrowserContexts target_mode, - const url::Origin& source_origin, - std::vector allow_patterns, - std::vector block_patterns, - base::OnceClosure closure) override; - content::SharedCorsOriginAccessList* GetSharedCorsOriginAccessList() override; - CookieChangeNotifier* cookie_change_notifier() const { return cookie_change_notifier_.get(); } @@ -199,9 +190,6 @@ class ElectronBrowserContext network::mojom::SSLConfigPtr ssl_config_; mojo::Remote ssl_config_client_; - scoped_refptr - shared_cors_origin_access_list_; - base::WeakPtrFactory weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ElectronBrowserContext);