webview: Add cookie headers to shouldInterceptRequest The problem is that shouldInterceptRequest gets fired before the net stack ultimately adds the cookie header. This means that Android developers have to separately query the cookie manager for headers but as we introduce new changes to the cookie header, the CookieManager API can't keep up. The one issue with this approach is that we are of course having to try replicate what the network stack would be doing. In this case, I am matching the partitioning but there could be other cookie behaviors we need to preserve. We are somewhat forced to maintain this already for WebView's restricted cookie manager so we can share the policy which lowers the maintenance burden a bit. We also discovered that Set-Cookie doesn't have an effect with shouldInterceptRequest either for similar reasons. The Set-Cookie header is not allowed to be persisted over the mojo calls so we need to return that value to our URL Loader factory with a simple callback. Bug: 41496912 Change-Id: Iff5cc37ab0f678c59503cc9d69e3c05cd4ccdf4a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5616051 Reviewed-by: Richard (Torne) Coles <torne@chromium.org> Commit-Queue: Rupert Wiser <bewise@chromium.org> Auto-Submit: Rupert Wiser <bewise@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Reviewed-by: Dylan Cutler <dylancutler@google.com> Cr-Commit-Position: refs/heads/main@{#1321072}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.