• Nate Fischer's avatar
    AW UMA: fix force-enable switch · e83349ad
    Nate Fischer authored
    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: default avatarTao Bai <michaelbai@chromium.org>
    Commit-Queue: Nate Fischer <ntfschr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#702154}
    e83349ad
aw_metrics_service_client.h 5.49 KB