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:
@@ -283,14 +283,24 @@ CEF_EXPORT int cef_delete_cookies(const cef_string_t* url,
|
||||
{
|
||||
CefString urlStr, cookieNameStr;
|
||||
|
||||
if(url)
|
||||
if (url)
|
||||
urlStr = url;
|
||||
if(cookie_name)
|
||||
if (cookie_name)
|
||||
cookieNameStr = cookie_name;
|
||||
|
||||
return CefDeleteCookies(urlStr, cookieNameStr);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_set_cookie_path(const cef_string_t* path)
|
||||
{
|
||||
CefString pathStr;
|
||||
|
||||
if (path)
|
||||
pathStr = path;
|
||||
|
||||
return CefSetCookiePath(pathStr);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_visit_storage(enum cef_storage_type_t type,
|
||||
const cef_string_t* origin, const cef_string_t* key,
|
||||
struct _cef_storage_visitor_t* visitor)
|
||||
@@ -334,3 +344,14 @@ CEF_EXPORT int cef_delete_storage(enum cef_storage_type_t type,
|
||||
|
||||
return CefDeleteStorage(type, origin, key);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_set_storage_path(enum cef_storage_type_t type,
|
||||
const cef_string_t* path)
|
||||
{
|
||||
CefString pathStr;
|
||||
|
||||
if (path)
|
||||
pathStr = path;
|
||||
|
||||
return CefSetStoragePath(type, pathStr);
|
||||
}
|
||||
|
@@ -205,6 +205,11 @@ bool CefDeleteCookies(const CefString& url, const CefString& cookie_name)
|
||||
true : false;
|
||||
}
|
||||
|
||||
bool CefSetCookiePath(const CefString& path)
|
||||
{
|
||||
return cef_set_cookie_path(path.GetStruct()) ? true : false;
|
||||
}
|
||||
|
||||
bool CefVisitStorage(CefStorageType type, const CefString& origin,
|
||||
const CefString& key,
|
||||
CefRefPtr<CefStorageVisitor> visitor)
|
||||
@@ -226,3 +231,8 @@ bool CefDeleteStorage(CefStorageType type, const CefString& origin,
|
||||
return cef_delete_storage(type, origin.GetStruct(), key.GetStruct()) ?
|
||||
true : false;
|
||||
}
|
||||
|
||||
bool CefSetStoragePath(CefStorageType type, const CefString& path)
|
||||
{
|
||||
return cef_set_storage_path(type, path.GetStruct()) ? true : false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user