cloudtrends / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
1 stars 1 forks source link

Added cookie support #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Added support for setting cookies.

Due to the new code being for both library and also client, the translator
screws it up!

Original issue reported on code.google.com by lodle...@gmail.com on 7 Jun 2010 at 5:55

Attachments:

GoogleCodeExporter commented 9 years ago
Gah, this is meant to be an enhancement 

Original comment by lodle...@gmail.com on 7 Jun 2010 at 5:56

GoogleCodeExporter commented 9 years ago
This is a working version and doesnt screw with the translator

Original comment by lodle...@gmail.com on 7 Jun 2010 at 7:01

Attachments:

GoogleCodeExporter commented 9 years ago
Accessing WebKit::webKitClient()->cookieJar() from multiple threads is probably 
not safe. You likely need to proxy these requests to the UI thread.

Original comment by magreenb...@gmail.com on 17 Jun 2010 at 9:00

GoogleCodeExporter commented 9 years ago
Hmm. I do it before any browsers are created (i.e. strait after the CefInit 
function call) so havnt run into any threading issues. Will look into it.

Original comment by lodle...@gmail.com on 18 Jun 2010 at 6:54

GoogleCodeExporter commented 9 years ago
Its fine as it passes off to BrowserResourceLoaderBridge::SetCookie which runs 
on the io thread thus its thread safe.

Original comment by lodle...@gmail.com on 21 Jun 2010 at 2:13

GoogleCodeExporter commented 9 years ago
Its fine as it passes off to BrowserResourceLoaderBridge::SetCookie which runs 
on the io thread thus its thread safe.

Original comment by lodle...@gmail.com on 21 Jun 2010 at 2:13

GoogleCodeExporter commented 9 years ago
The problem is that someone could call one of the Cef*Cookie() functions from a 
thread other than the IO thread.

Original comment by magreenb...@gmail.com on 21 Jun 2010 at 1:10

GoogleCodeExporter commented 9 years ago
It doesnt matter as internally (inside Cef static) it gets routed via 
BrowserResourceLoaderBridge::SetCookie which ends up on the io thread

See: browser_webcookiejar_impl.cc

Original comment by lodle...@gmail.com on 22 Jun 2010 at 1:25

GoogleCodeExporter commented 9 years ago
CefSetCookie() eventually calls 
WebKit::webKitClient()->cookieJar()->setCookie(). CefSetCookie() can be called 
on any thread. WebKit::webKitClient()->cookieJar()->setCookie() should only be 
called on the UI thread. Hence you must proxy the request to the UI thread (if 
it's not already on the UI thread) before calling 
WebKit::webKitClient()->cookieJar()->setCookie().

Original comment by magreenb...@gmail.com on 22 Jun 2010 at 3:01

GoogleCodeExporter commented 9 years ago
Cookie get/set support is added in revision 217.

Original comment by magreenb...@gmail.com on 9 Apr 2011 at 1:07