mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove methods that modify cookie storage at runtime (see issue #2622).
This change removes cookie and request handler functionality that will not supported by the NetworkService. Specifically, it is no longer possible to change cookie storage locations at runime by returning a different CefCookieManager for an already initialized CefRequestContext. After this change you will need to use a separate CefRequestContext when creating a CefBrowser if you require separate cookie storage. The following methods have been removed: - CefCookieManager::CreateManager - CefCookieManager::GetBlockingManager - CefCookieManager::SetStoragePath - CefRequestContextHandler::GetCookieManager The following methods have been renamed: - CefRequestContext::GetDefaultCookieManager to GetCookieManager. This change substantially simplifies the network implementation in CEF because it is no longer necessary to proxy objects that are normally owned by Chromium. Chromium patches that are no longer necessary will be removed as a follow-up commit. To test: Verify that `ceftests --gtest_filter=-PluginTest.*` pass with NetworkService disabled. Plugin tests will be fixed in a follow-up commit.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "libcef/browser/audio_mirror_destination.h"
|
||||
#include "libcef/browser/browser_context_impl.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/browser_info.h"
|
||||
#include "libcef/browser/browser_info_manager.h"
|
||||
#include "libcef/browser/browser_platform_delegate.h"
|
||||
@ -317,7 +317,7 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
|
||||
DCHECK(browser_context);
|
||||
|
||||
// A StoragePartitionImplMap must already exist for the BrowserContext. See
|
||||
// additional comments in CefBrowserContextImpl::Initialize().
|
||||
// additional comments in CefBrowserContext::Initialize().
|
||||
DCHECK(browser_context->GetUserData(
|
||||
content::BrowserContext::GetStoragePartitionMapUserDataKey()));
|
||||
|
||||
@ -3353,16 +3353,11 @@ void CefBrowserHostImpl::CreateExtensionHost(
|
||||
extensions::ViewType host_type) {
|
||||
DCHECK(!extension_host_);
|
||||
|
||||
// Use the *Impl context because ProcessManager expects it for notification
|
||||
// registration.
|
||||
CefBrowserContextImpl* impl_context =
|
||||
CefBrowserContextImpl::GetForContext(browser_context);
|
||||
|
||||
if (host_type == extensions::VIEW_TYPE_EXTENSION_DIALOG ||
|
||||
host_type == extensions::VIEW_TYPE_EXTENSION_POPUP) {
|
||||
// Create an extension host that we own.
|
||||
extension_host_ = new extensions::CefExtensionViewHost(
|
||||
this, extension, impl_context, host_contents, url, host_type);
|
||||
this, extension, browser_context, host_contents, url, host_type);
|
||||
// Trigger load of the extension URL.
|
||||
extension_host_->CreateRenderViewSoon();
|
||||
} else if (host_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
|
||||
@ -3370,7 +3365,7 @@ void CefBrowserHostImpl::CreateExtensionHost(
|
||||
// Create an extension host that will be owned by ProcessManager.
|
||||
extension_host_ = new extensions::CefExtensionBackgroundHost(
|
||||
this, base::BindOnce(&CefBrowserHostImpl::OnExtensionHostDeleted, this),
|
||||
extension, impl_context, host_contents, url, host_type);
|
||||
extension, browser_context, host_contents, url, host_type);
|
||||
// Load will be triggered by ProcessManager::CreateBackgroundHost.
|
||||
} else {
|
||||
NOTREACHED() << " Unsupported extension host type: " << host_type;
|
||||
|
Reference in New Issue
Block a user