Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CloudOpenMetrics] Detect WrongValueLogged state in switch statement
Use switch statements instead of `base::Contains()` to check if a metric was logged with the wrong value. This guarantees that the CloudOpenMetrics object will be updated when any enums are expanded because Chrome cannot be compiled otherwise. Remove the Metric methods: - IsNotLoggedWith() - IsLoggedWith() Remove CloudOpenMetrics methods: - ExpectNotLoggedWith() - ExpectLoggedWith() Introduce CloudOpenMetrics::SetWrongValueLogged() to update the metric state and print debug information. Also, expand the check for drive_open_error_ when task_result_ is kFallbackQuickOffice or kCancelledAtFallback to accommodate extra enums added. Bug: b/300861997 Change-Id: I139af3ee3ddb73f8c540aedb96b4193425927ab6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974771 Commit-Queue: Cassy Chun-Crogan <cassycc@google.com> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216767}
- Loading branch information