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}
34 files changed