mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Move cookieable scheme configuration to settings (see issue #2969)
The Chrome runtime requires that cookieable scheme information be available at Profile initialization time because it also triggers NetworkContext creation at the same time. To make this possible, and to avoid various race conditions when setting state, the cookieable scheme configuration has been added as |cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in CefSettings and CefBrowserContextSettings. The CefCookieManager:: SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods are no longer required and have been removed. This change also modifies chrome to delay OffTheRecordProfileImpl initialization so that |ChromeBrowserContext::profile_| can be set before ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext and associated cookieable scheme information. Otherwise, the ChromeBrowserContext will not be matched and the NetworkContext will not be configured correctly. The CookieTest suite now passes with the Chrome runtime enabled.
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=54c5210924095c7e43173a2843bd28729645922b$
|
||||
// $hash=ade537f836add7fe0b5fd94ceba26d678abb3e43$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
|
||||
@ -60,25 +60,6 @@ typedef struct _cef_browser_process_handler_t {
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread to retrieve the list of schemes
|
||||
// that should support cookies. If |include_defaults| is true (1) the default
|
||||
// schemes ("http", "https", "ws" and "wss") will also be supported. Providing
|
||||
// an NULL |schemes| value and setting |include_defaults| to false (0) will
|
||||
// disable all loading and saving of cookies.
|
||||
//
|
||||
// This state will apply to the cef_cookie_manager_t associated with the
|
||||
// global cef_request_context_t. It will also be used as the initial state for
|
||||
// any new cef_request_context_ts created by the client. After creating a new
|
||||
// cef_request_context_t the cef_cookie_manager_t::SetSupportedSchemes
|
||||
// function may be called on the associated cef_cookie_manager_t to futher
|
||||
// override these values.
|
||||
///
|
||||
void(CEF_CALLBACK* get_cookieable_schemes)(
|
||||
struct _cef_browser_process_handler_t* self,
|
||||
cef_string_list_t schemes,
|
||||
int* include_defaults);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread immediately after the CEF context
|
||||
// has been initialized.
|
||||
|
Reference in New Issue
Block a user