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:
@@ -64,21 +64,6 @@ class CefCookieManager : public virtual CefBaseRefCounted {
|
||||
static CefRefPtr<CefCookieManager> GetGlobalManager(
|
||||
CefRefPtr<CefCompletionCallback> callback);
|
||||
|
||||
///
|
||||
// Set the schemes supported by this manager. If |include_defaults| is true
|
||||
// the default schemes ("http", "https", "ws" and "wss") will also be
|
||||
// supported. Calling this method with an empty |schemes| value and
|
||||
// |include_defaults| set to false will disable all loading and saving of
|
||||
// cookies for this manager. If |callback| is non-NULL it will be executed
|
||||
// asnychronously on the UI thread after the change has been applied. Must be
|
||||
// called before any cookies are accessed.
|
||||
///
|
||||
/*--cef(optional_param=callback)--*/
|
||||
virtual void SetSupportedSchemes(
|
||||
const std::vector<CefString>& schemes,
|
||||
bool include_defaults,
|
||||
CefRefPtr<CefCompletionCallback> callback) = 0;
|
||||
|
||||
///
|
||||
// Visit all cookies on the UI thread. The returned cookies are ordered by
|
||||
// longest path, then by earliest creation date. Returns false if cookies
|
||||
|
Reference in New Issue
Block a user