New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 804902 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Check chrome_metrics_service_client.cc for proper metrics-enabled calls.

Project Member Reported by bcwh...@chromium.org, Jan 23 2018

Issue description

Chrome Version: HEAD
OS: ALL

The chrome_metrics_service_client.cc file checks for metrics being enabled using several different mechanisms.

Consolidate these to use a single interface, such as
  metrics_state_manager_->IsMetricsReportingEnabled()
which also includes the "sampling" field-trial setting.

 
WatcherMetricsProvider seems to use the provider APIs to do this:

https://cs.chromium.org/chromium/src/components/browser_watcher/watcher_metrics_provider_win.cc?rcl=66c1709ec979d06ca7f0f9dcd6ffec02cda93b01&l=207

via OnRecordingEnabled() and OnRecordingDisabled(). This seems overly complex to expect each provider to do correctly. Maybe we should make an explicit provider API for this use case? i.e. CleanUpExternalState() or similar.
We also have ClearSavedStabilityMetrics() for a similar case, although not quite the same one:

https://cs.chromium.org/chromium/src/chrome/browser/metrics/metrics_reporting_state.cc?rcl=126515aa5522f600413dea854dfc06f4c90f105d&l=110

Would be good to unify that as well.
Also see the recently filed bug 804443, about the metrics reporting forcing flag being respected in some places and not others.

Sign in to add a comment