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,11 +9,10 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=2decd7941020bd2b96ebfa736624d1729a82fa55$
|
||||
// $hash=b98ed34333ccd44a004c88c0ca496f7821f49e18$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
@ -39,22 +38,6 @@ void CEF_CALLBACK request_context_handler_on_request_context_initialized(
|
||||
CefRequestContextCToCpp::Wrap(request_context));
|
||||
}
|
||||
|
||||
cef_cookie_manager_t* CEF_CALLBACK request_context_handler_get_cookie_manager(
|
||||
struct _cef_request_context_handler_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefCookieManager> _retval =
|
||||
CefRequestContextHandlerCppToC::Get(self)->GetCookieManager();
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefCookieManagerCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK request_context_handler_on_before_plugin_load(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
const cef_string_t* mime_type,
|
||||
@ -99,7 +82,6 @@ int CEF_CALLBACK request_context_handler_on_before_plugin_load(
|
||||
CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC() {
|
||||
GetStruct()->on_request_context_initialized =
|
||||
request_context_handler_on_request_context_initialized;
|
||||
GetStruct()->get_cookie_manager = request_context_handler_get_cookie_manager;
|
||||
GetStruct()->on_before_plugin_load =
|
||||
request_context_handler_on_before_plugin_load;
|
||||
}
|
||||
|
Reference in New Issue
Block a user