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:
@ -5,7 +5,7 @@
|
||||
|
||||
#include "libcef/browser/chrome_profile_manager_stub.h"
|
||||
|
||||
#include "libcef/browser/browser_context_impl.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
|
||||
namespace {
|
||||
@ -20,8 +20,8 @@ namespace {
|
||||
// context for the currently active browser (e.g. the browser with input focus).
|
||||
// Return the main context for now since we don't currently have a good way to
|
||||
// determine that.
|
||||
CefBrowserContextImpl* GetActiveBrowserContext() {
|
||||
return static_cast<CefBrowserContextImpl*>(
|
||||
CefBrowserContext* GetActiveBrowserContext() {
|
||||
return static_cast<CefBrowserContext*>(
|
||||
CefContentBrowserClient::Get()->request_context()->GetBrowserContext());
|
||||
}
|
||||
|
||||
@ -34,8 +34,8 @@ ChromeProfileManagerStub::~ChromeProfileManagerStub() {}
|
||||
|
||||
Profile* ChromeProfileManagerStub::GetProfile(
|
||||
const base::FilePath& profile_dir) {
|
||||
CefBrowserContextImpl* browser_context =
|
||||
CefBrowserContextImpl::GetForCachePath(profile_dir);
|
||||
CefBrowserContext* browser_context =
|
||||
CefBrowserContext::GetForCachePath(profile_dir);
|
||||
if (!browser_context) {
|
||||
// ProfileManager makes assumptions about profile directory paths that do
|
||||
// not match CEF usage. For example, the default Chrome profile name is
|
||||
@ -51,7 +51,7 @@ Profile* ChromeProfileManagerStub::GetProfile(
|
||||
bool ChromeProfileManagerStub::IsValidProfile(const void* profile) {
|
||||
if (!profile)
|
||||
return false;
|
||||
return !!CefBrowserContextImpl::GetForContext(
|
||||
return !!CefBrowserContext::GetForContext(
|
||||
reinterpret_cast<content::BrowserContext*>(const_cast<void*>(profile)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user