Configuring Cookies for NetworkService |
||||||||
Issue descriptionAlthough there's more work to be done for Cookies in general, we will be blocked until we configure cookies on the network context. I think this should require: * NetworkContextParams.channel_id_path * NetworkContextParams.cookie_path * NetworkContextParams.cookie_manager_params I'm not 100% clear on channel_id_path and cookie_path (not sure if the latter should be used by WebView). This also ties into WebView's TokenBinding feature, but this is a hidden API and it's not clear if this is really used by anyone (aside from sgurun@'s demo app [1]). If anyone has more background, that would be appreciated. It also seems CookieManagerParams would be global for all WebViews, but we currently support per-WebView cookie settings (e.g., acceptThirdPartyCookies [2]), so it seems we may need a new API in the network service. [1] https://cs.corp.google.com/android/vendor/google_experimental/users/sgurun/TokenBinding/src/com/test/Tokenbinding/Tokenbinding.java?q=package:android+tokenbinding+lang:java&dr=CSs&l=1 [2] https://developer.android.com/reference/android/webkit/CookieManager.html#acceptThirdPartyCookies(android.webkit.WebView)
,
Nov 7
rdsmith wrote up a doc on his thoughts on how to handle this, before he left the team: https://docs.google.com/document/d/1s1vL8hNDPvOhssgsp8HjgL9yKZMzwo50yY5Hy8X6iE4/edit#heading=h.teti343s2ez2 Channel ID is deprecated, so I don't think we have to worry about it. Cookies are a problem, because WebView wants to be able to muck with the cookie store without the rest of Chrome being loaded. It looks like we may just be able to create a fully configured NetworkContext in the absence of everything else, and have the BrowserContext adopt it if needed. If we can go with that approach, it will make our lives much simpler.
,
Nov 13
,
Nov 13
,
Nov 20
+1 to comment 2. Since we know that Android WebView only uses default storage partition and doesn't use incognito, and only has one BrowserContext, AwContentBrowserClient::CreateNetworkContext() could return the mojo pointer to NetworkContext that was created early before content/ is initialized.
,
Nov 20
I'll look into this, and implementing some of the cookie APIs. I think we're also missing some coverage (for example, there's no coverage for flushing cookies [1]) to storage. I'll focus on configuring the NetworkContext first, and adding coverage. [1] https://cs.chromium.org/search/?q=f:android_webview/javatests/+flush+cookie&sq=package:chromium&type=cs
,
Dec 12
Issue 792668 has been merged into this issue.
,
Dec 20
,
Jan 8
,
Jan 16
(Bulk edit to add component)
,
Jan 18
(4 days ago)
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ntfschr@chromium.org
, Nov 7