AW UMA: fix force-enable switch
The --force-enable-metrics-reporting switch was previously implemented to override sampling, but didn't correctly override user consent. This fixes that, and modifies the unittests to verify correct behavior by checking the metrics service actual starts up. To accommodate privacy concerns, this flag does not override app consent. We separate user and app consent to plumb both values down, and we add a test case to verify the flag respects app consent. This also splits the previous test case into multiple cases, which is necessary in order to initialize the client under two different sets of conditions. Bug: 994418 Test: run_android_webview_unittests --gtest_filter=AwMetricsServiceClientTest.* Test: Opt-out of metrics in settings, AwMetricsLogUploader is called Test: Opt-out WebView shell in manifest, AwMetricsLogUploader is not called Change-Id: I1e177bd5e3a5622c694e2275f18408d946b69397 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815545Reviewed-by:Tao Bai <michaelbai@chromium.org> Commit-Queue: Nate Fischer <ntfschr@chromium.org> Cr-Commit-Position: refs/heads/master@{#702154}
Showing
Please register or sign in to comment