Hi
I have been trying to set a cookie in OnBeforeResource Load
CefRefPtr<CefCookieManager> manager = CefCookieManager::GetGlobalManager(nullptr);
CefCookie cookie;
CefString(&cookie.name).FromString("test");
CefString(&cookie.value).FromString("value");
CefString(&cookie.domain).FromString(".google.com"); // sample domain: .domain.com
CefString(&cookie.path).FromASCII("/");
cookie.has_expires = false;
CefRefPtr<CefWaitableEvent> event = CefWaitableEvent::CreateWaitableEvent(true, false);
CefRefPtr<CefSetCookie> setCookieCallback = new CefSetCookie(manager);
setCookieCallback->SetEvent(event);
bool result = manager->SetCookie("https://www.google.com", cookie,setCookieCallback);
event->Wait();
I receive the result as true but when I log the request headers the cookie does not seem to be set there and is also not visible in database.I also tried setting the cookie before creation of browser and called the manager->FlushStore() but still the cookie is not visible in the db.If someone could please let me know where I might be going wrong and which is the right place to set the cookie and validate that it is being sent in the request to the browser it will be really helpfull.Thank you!