commit | 858749454ca817bcd0dbd114a2f9fc067f18f0ea | [log] [tgz] |
---|---|---|
author | Victor Costan <pwnall@chromium.org> | Wed Feb 28 04:11:44 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Feb 28 04:11:44 2018 |
tree | b87dca510ad84e5b13f6dad78e6747d119eb1fd9 | |
parent | a52cb5abfa5183b5627020b749c55de5304c5610 [diff] |
Cookie Store: Remove GetCookiesWithOptionsAsync. CookieStore::GetCookiesWithOptionsAsync is conceptually a convenience method on top of CookieStore::GetCookieListWithOptionsAsync, and is only used in Android-specific code and in tests. CookieStore is a fairly low-level abstract interface with many implementations, so convenience methods are fairly expensive. The usage of GetCookieListWithOptionsAsync is not high enough to be worth its cost. This CL removes the method, and rewrites the relevant tests to use GetCookieListWithOptionsAsync, so they cover the code that's actually used in production. In order to avoid changing Android WebView APIs, this CL uses CookieStore::BuildCookieLine in conjunction with CookieStore::GetCookieListWithOptionsAsync. This approach introduces a potential behavior change in MediaResourceGetterImpl. Previously, the GetCookies implementation invoked CookieStore::GetAllCookiesForURLAsync to obtain a net::CookieList that was passed to ContentBrowserClient::AllowGetCookie, and then invoked CookieStore::GetCookiesWithOptionsAsync to obtain a std::string that was passed to the GetCookies' callback. The new implementation uses CanonicalCookie::BuildCookieLine to convert the net::CookieList seen by AllowGetCookie to a std::string that is passed to GetCookies' callback. This means that AllowGetCookie will definitely operate on the same data that is passed to GetCookies' callback. Bug: 729800, 588081 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I56c9bfa5e8bf9d6b627d752e5b4962029577d122 Reviewed-on: https://chromium-review.googlesource.com/936790 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by: Richard Coles <torne@chromium.org> Reviewed-by: Mark Cogan <marq@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Randy Smith <rdsmith@chromium.org> Cr-Commit-Position: refs/heads/master@{#539704}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .