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 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=bd8fe0f41380bc1e5ecedbcab726bc2ed875f827$
|
||||
// $hash=fdbb50cba70b9638aaaadc2e4040b18390ae3a6d$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
@ -36,35 +36,6 @@ CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager(
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::GetBlockingManager() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_get_blocking_manager();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::CreateManager(
|
||||
const CefString& path,
|
||||
bool persist_session_cookies,
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path, callback
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager(
|
||||
path.GetStruct(), persist_session_cookies,
|
||||
CefCompletionCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
@ -192,28 +163,6 @@ bool CefCookieManagerCToCpp::DeleteCookies(
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefCookieManagerCToCpp::SetStoragePath(
|
||||
const CefString& path,
|
||||
bool persist_session_cookies,
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
cef_cookie_manager_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, set_storage_path))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path, callback
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->set_storage_path(
|
||||
_struct, path.GetStruct(), persist_session_cookies,
|
||||
CefCompletionCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefCookieManagerCToCpp::FlushStore(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=2363533e3c6b78e16b93dd428121cd45b797ce6a$
|
||||
// $hash=99bb8be3c19be11e4abf2cf904d75667723ae643$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
@ -48,9 +48,6 @@ class CefCookieManagerCToCpp
|
||||
bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name,
|
||||
CefRefPtr<CefDeleteCookiesCallback> callback) OVERRIDE;
|
||||
bool SetStoragePath(const CefString& path,
|
||||
bool persist_session_cookies,
|
||||
CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=ed414e127773ef135584c3c61a386615177feb59$
|
||||
// $hash=8155639f093ff697fd30a9e330ae3470108251e5$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
@ -165,10 +165,10 @@ NO_SANITIZE("cfi-icall") CefString CefRequestContextCToCpp::GetCachePath() {
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetDefaultCookieManager(
|
||||
CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetCookieManager(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_default_cookie_manager))
|
||||
if (CEF_MEMBER_MISSING(_struct, get_cookie_manager))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -176,7 +176,7 @@ CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetDefaultCookieManager(
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = _struct->get_default_cookie_manager(
|
||||
cef_cookie_manager_t* _retval = _struct->get_cookie_manager(
|
||||
_struct, CefCompletionCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: refptr_same
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=52475096e498cd28cbd25676eaab24e14c1438b0$
|
||||
// $hash=73f229f21f0d9ce78f3897fd8a2ec94261a52f48$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
|
||||
@ -43,7 +43,7 @@ class CefRequestContextCToCpp
|
||||
bool IsGlobal() OVERRIDE;
|
||||
CefRefPtr<CefRequestContextHandler> GetHandler() OVERRIDE;
|
||||
CefString GetCachePath() OVERRIDE;
|
||||
CefRefPtr<CefCookieManager> GetDefaultCookieManager(
|
||||
CefRefPtr<CefCookieManager> GetCookieManager(
|
||||
CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
bool RegisterSchemeHandlerFactory(
|
||||
const CefString& scheme_name,
|
||||
|
@ -9,11 +9,10 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=80c600e8a2f2035219c00bad1bf28a58b6dabf53$
|
||||
// $hash=4b25ca3feb69361cc3b6525fdc0c3a56710b65ec$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_handler_ctocpp.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
|
||||
@ -38,21 +37,6 @@ void CefRequestContextHandlerCToCpp::OnRequestContextInitialized(
|
||||
_struct, CefRequestContextCppToC::Wrap(request_context));
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefCookieManager> CefRequestContextHandlerCToCpp::GetCookieManager() {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_cookie_manager))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = _struct->get_cookie_manager(_struct);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefCookieManagerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefRequestContextHandlerCToCpp::OnBeforePluginLoad(
|
||||
const CefString& mime_type,
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=f60c9110cba752df545af2fe5905a01d30ff588e$
|
||||
// $hash=3cf1dba9c137bc586d91149920ff4558bce74a58$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_HANDLER_CTOCPP_H_
|
||||
@ -39,7 +39,6 @@ class CefRequestContextHandlerCToCpp
|
||||
// CefRequestContextHandler methods.
|
||||
void OnRequestContextInitialized(
|
||||
CefRefPtr<CefRequestContext> request_context) override;
|
||||
CefRefPtr<CefCookieManager> GetCookieManager() override;
|
||||
bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
bool is_main_frame,
|
||||
|
Reference in New Issue
Block a user