Part of my code look like this:
- Code: Select all
CefCookie cookie;
CefRefPtr< CefCookieManager > cookieManager = CefCookieManager::GetGlobalManager(NULL);
CefRefPtr<CefSetCookieCallback> callback = new EmptySetCookieCallback();
std::wstring httpUrl(HTTP);
//...
CefPostTask(TID_UI, CefCreateClosureTask(base::Bind(&CefCookieManager::SetCookie, cookieManager, CefString(httpUrl.c_str()), cookie, callback)));
But it gives error message when compiling:
3>********(1210) : error C2664: 'CefCreateClosureTask' : cannot convert parameter 1 from 'base::Callback<Sig>' to 'const base::Closure &'
3> with
3> [
3> Sig=bool (void)
3> ]
3> Reason: cannot convert from 'base::Callback<Sig>' to 'const base::Closure'
3> with
3> [
3> Sig=bool (void)
3> ]
3> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
I have used the combination of CefCreateClosureTask and base::Bind somewhere else in my project without error, only here. Can anyone help me fix the problem? Thanks