AW: add UMA for fix-up secure cookie behavior

No change to production logic.

This adds UMA logging for MaybeFixUpSchemeForSecureCookie(), a method
which, to support legacy applications, replaces HTTP scheme URLs with
HTTPS scheme URLs if the app tries to set a 'Secure' cookie (this used
to work in chromium, but Chrome enforces a Strict Secure Cookie Policy
now).

This adds tests to check we log this metric as intended.

Bug: 933981
Test: run_webview_instrumentation_test_apk -f CookieManagerTest
Cq-Include-Trybots: luci.chromium.try:android_mojo
Change-Id: Ie88f0f1d0482a4f46cca93a41a56595c3c83575e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647176
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668064}
4 files changed