Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefCookieManager

CefBaseRefCounted
   |
   +--CefCookieManager

   in cef_cookie.h

class CefCookieManager
extends CefBaseRefCounted

Class used for managing cookies. The methods of this class may be called on any thread unless otherwise indicated.


Method Summary
 virtual bool DeleteCookies( const CefString& url, const CefString& cookie_name, CefRefPtr< CefDeleteCookiesCallback > callback )= 0
          Delete all cookies that match the specified parameters.
 virtual bool FlushStore( CefRefPtr< CefCompletionCallback > callback )= 0
          Flush the backing store (if any) to disk.
 static CefRefPtr< CefCookieManager > GetGlobalManager( CefRefPtr< CefCompletionCallback > callback )
          Returns the global cookie manager.
 virtual bool SetCookie( const CefString& url, const CefCookie& cookie, CefRefPtr< CefSetCookieCallback > callback )= 0
          Sets a cookie given a valid URL and explicit user-provided cookie attributes.
 virtual void SetSupportedSchemes( const std::vector< CefString >& schemes, bool include_defaults, CefRefPtr< CefCompletionCallback > callback )= 0
          Set the schemes supported by this manager.
 virtual bool VisitAllCookies( CefRefPtr< CefCookieVisitor > visitor )= 0
          Visit all cookies on the UI thread.
 virtual bool VisitUrlCookies( const CefString& url, bool includeHttpOnly, CefRefPtr< CefCookieVisitor > visitor )= 0
          Visit a subset of cookies on the UI thread.
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

DeleteCookies

public virtual bool DeleteCookies( const CefString& url, const CefString& cookie_name, CefRefPtr< CefDeleteCookiesCallback > callback )= 0;
Delete all cookies that match the specified parameters. If both |url| and |cookie_name| values are specified all host and domain cookies matching both will be deleted. If only |url| is specified all host cookies (but not domain cookies) irrespective of path will be deleted. If |url| is empty all cookies for all hosts and domains will be deleted. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the cookies have been deleted. Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed. Cookies can alternately be deleted using the Visit*Cookies() methods.

FlushStore

public virtual bool FlushStore( CefRefPtr< CefCompletionCallback > callback )= 0;
Flush the backing store (if any) to disk. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the flush is complete. Returns false if cookies cannot be accessed.

GetGlobalManager

public static CefRefPtr< CefCookieManager > GetGlobalManager( CefRefPtr< CefCompletionCallback > callback );
Returns the global cookie manager. By default data will be stored at CefSettings.cache_path if specified or in memory otherwise. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the manager's storage has been initialized. Using this method is equivalent to calling CefRequestContext::GetGlobalContext()->GetDefaultCookieManager().

SetCookie

public virtual bool SetCookie( const CefString& url, const CefCookie& cookie, CefRefPtr< CefSetCookieCallback > callback )= 0;
Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie value attribute) and fail without setting the cookie if such characters are found. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the cookie has been set. Returns false if an invalid URL is specified or if cookies cannot be accessed.

SetSupportedSchemes

public virtual void SetSupportedSchemes( const std::vector< CefString >& schemes, bool include_defaults, CefRefPtr< CefCompletionCallback > callback )= 0;
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.

VisitAllCookies

public virtual bool VisitAllCookies( CefRefPtr< CefCookieVisitor > visitor )= 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 cannot be accessed.

VisitUrlCookies

public virtual bool VisitUrlCookies( const CefString& url, bool includeHttpOnly, CefRefPtr< CefCookieVisitor > visitor )= 0;
Visit a subset of cookies on the UI thread. The results are filtered by the given url scheme, host, domain and path. If |includeHttpOnly| is true HTTP-only cookies will also be included in the results. The returned cookies are ordered by longest path, then by earliest creation date. Returns false if cookies cannot be accessed.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt