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:
@ -7,7 +7,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "libcef/browser/browser_context_impl.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/browser_host_impl.h"
|
||||
#include "libcef/browser/extensions/component_extension_resource_manager.h"
|
||||
#include "libcef/browser/extensions/extension_system.h"
|
||||
@ -65,13 +65,13 @@ bool CefExtensionsBrowserClient::AreExtensionsDisabled(
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsValidContext(BrowserContext* context) {
|
||||
return CefBrowserContextImpl::GetForContext(context) != NULL;
|
||||
return CefBrowserContext::GetForContext(context) != NULL;
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsSameContext(BrowserContext* first,
|
||||
BrowserContext* second) {
|
||||
// Returns true if |first| and |second| share the same underlying
|
||||
// CefBrowserContextImpl.
|
||||
// CefBrowserContext.
|
||||
return GetCefImplContext(first) == GetCefImplContext(second);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ BrowserContext* CefExtensionsBrowserClient::GetOriginalContext(
|
||||
|
||||
BrowserContext* CefExtensionsBrowserClient::GetCefImplContext(
|
||||
BrowserContext* context) {
|
||||
return CefBrowserContextImpl::GetForContext(context);
|
||||
return CefBrowserContext::GetForContext(context);
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::IsGuestSession(BrowserContext* context) const {
|
||||
@ -196,10 +196,8 @@ bool CefExtensionsBrowserClient::CreateBackgroundExtensionHost(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& url,
|
||||
ExtensionHost** host) {
|
||||
// The BrowserContext referenced by ProcessManager should always be an *Impl.
|
||||
DCHECK(!static_cast<CefBrowserContext*>(browser_context)->is_proxy());
|
||||
CefBrowserContextImpl* browser_context_impl =
|
||||
CefBrowserContextImpl::GetForContext(browser_context);
|
||||
CefBrowserContext* browser_context_impl =
|
||||
CefBrowserContext::GetForContext(browser_context);
|
||||
|
||||
// A CEF representation should always exist.
|
||||
CefRefPtr<CefExtension> cef_extension =
|
||||
@ -211,7 +209,6 @@ bool CefExtensionsBrowserClient::CreateBackgroundExtensionHost(
|
||||
}
|
||||
|
||||
// Always use the same request context that the extension was registered with.
|
||||
// May represent an *Impl or *Proxy BrowserContext.
|
||||
// GetLoaderContext() will return NULL for internal extensions.
|
||||
CefRefPtr<CefRequestContext> request_context =
|
||||
cef_extension->GetLoaderContext();
|
||||
|
Reference in New Issue
Block a user