I have some code on Qt+ cef. And I try delete all cookies on 1 site.
- Code: Select all
CefString qs2cef(const QString &str)
{
CefString result(str.toStdWString());
return result;
}
void QCefWidget::clearCookies(const QString &url)
{
CefPostTask(TID_IO, new ClearCookiesTask(url));
}
...
void ClearCookiesTask::Execute()
{
CefRefPtr< CefCookieManager > m = CefCookieManager::GetGlobalManager();
qDebug()<<__FUNCTION__<<mUrl<<m->DeleteCookies(qs2cef((mUrl)), CefString());
}
If I try call function clearCookies("http://www.html-kit.com/tools/cookietester/");
Function output
- Code: Select all
ClearCookiesTask::Execute http://www.html-kit.com/tools/cookietester/ true
But cookies not delete, where is may be problem?
If i try call function in empty string, then delete all cookies.
P.s. sorry for my English.