mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefSetCookiePath() and CefSetStoragePath() functions for changing cookie and localStorage locations while CEF is running (issue #347).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@353 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -389,6 +389,14 @@ bool CefSetCookie(const CefString& url, const CefCookie& cookie);
|
||||
/*--cef()--*/
|
||||
bool CefDeleteCookies(const CefString& url, const CefString& cookie_name);
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing cookie data. If |path|
|
||||
// is empty data will be stored in memory only. By default the cookie path is
|
||||
// the same as the cache path. Returns false if cookies cannot be accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefSetCookiePath(const CefString& path);
|
||||
|
||||
|
||||
typedef cef_storage_type_t CefStorageType;
|
||||
|
||||
@@ -396,8 +404,9 @@ typedef cef_storage_type_t CefStorageType;
|
||||
// Visit storage of the specified type. If |origin| is non-empty only data
|
||||
// matching that origin will be visited. If |key| is non-empty only data
|
||||
// matching that key will be visited. Otherwise, all data for the storage
|
||||
// type will be visited. Returns false if the storage cannot be accessed.
|
||||
// Origin should be of the form scheme://domain.
|
||||
// type will be visited. Origin should be of the form scheme://domain. If no
|
||||
// origin is specified only data currently in memory will be returned. Returns
|
||||
// false if the storage cannot be accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefVisitStorage(CefStorageType type, const CefString& origin,
|
||||
@@ -423,6 +432,16 @@ bool CefSetStorage(CefStorageType type, const CefString& origin,
|
||||
bool CefDeleteStorage(CefStorageType type, const CefString& origin,
|
||||
const CefString& key);
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing data of the specified
|
||||
// type. Currently only the ST_LOCALSTORAGE type is supported by this method.
|
||||
// If |path| is empty data will be stored in memory only. By default the storage
|
||||
// path is the same as the cache path. Returns false if the storage cannot be
|
||||
// accessed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
bool CefSetStoragePath(CefStorageType type, const CefString& path);
|
||||
|
||||
|
||||
///
|
||||
// Interface defining the reference count implementation methods. All framework
|
||||
|
@@ -326,12 +326,20 @@ CEF_EXPORT int cef_set_cookie(const cef_string_t* url,
|
||||
CEF_EXPORT int cef_delete_cookies(const cef_string_t* url,
|
||||
const cef_string_t* cookie_name);
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing cookie data. If |path|
|
||||
// is NULL data will be stored in memory only. By default the cookie path is the
|
||||
// same as the cache path. Returns false (0) if cookies cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_set_cookie_path(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Visit storage of the specified type. If |origin| is non-NULL only data
|
||||
// matching that origin will be visited. If |key| is non-NULL only data matching
|
||||
// that key will be visited. Otherwise, all data for the storage type will be
|
||||
// visited. Returns false (0) if the storage cannot be accessed. Origin should
|
||||
// be of the form scheme://domain.
|
||||
// visited. Origin should be of the form scheme://domain. If no origin is
|
||||
// specified only data currently in memory will be returned. Returns false (0)
|
||||
// if the storage cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_visit_storage(enum cef_storage_type_t type,
|
||||
const cef_string_t* origin, const cef_string_t* key,
|
||||
@@ -355,6 +363,16 @@ CEF_EXPORT int cef_set_storage(enum cef_storage_type_t type,
|
||||
CEF_EXPORT int cef_delete_storage(enum cef_storage_type_t type,
|
||||
const cef_string_t* origin, const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Sets the directory path that will be used for storing data of the specified
|
||||
// type. Currently only the ST_LOCALSTORAGE type is supported by this function.
|
||||
// If |path| is NULL data will be stored in memory only. By default the storage
|
||||
// path is the same as the cache path. Returns false (0) if the storage cannot
|
||||
// be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_set_storage_path(enum cef_storage_type_t type,
|
||||
const cef_string_t* path);
|
||||
|
||||
typedef struct _cef_base_t
|
||||
{
|
||||
// Size of the data structure.
|
||||
|
Reference in New Issue
Block a user