Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Unified Diff: components/metrics/metrics_service.cc

Issue 2294323002: Avoid some pref writes in MetricsLog. Ensure some stability metrics are cleared. (Closed)
Patch Set: Fix unittests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/metrics_log_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 2c6b8ef0a2465233e695fcf8420dda38c2067e36..df9bd1b95522395267fb47353a652cfee6baefcb 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -523,7 +523,11 @@ void MetricsService::ClearSavedStabilityMetrics() {
provider->ClearSavedStabilityMetrics();
// Reset the prefs that are managed by MetricsService/MetricsLog directly.
+ local_state_->SetInteger(prefs::kStabilityBreakpadRegistrationSuccess, 0);
+ local_state_->SetInteger(prefs::kStabilityBreakpadRegistrationFail, 0);
local_state_->SetInteger(prefs::kStabilityCrashCount, 0);
+ local_state_->SetInteger(prefs::kStabilityDebuggerPresent, 0);
+ local_state_->SetInteger(prefs::kStabilityDebuggerNotPresent, 0);
local_state_->SetInteger(prefs::kStabilityExecutionPhase,
UNINITIALIZED_PHASE);
local_state_->SetInteger(prefs::kStabilityIncompleteSessionEndCount, 0);
« no previous file with comments | « components/metrics/metrics_log_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698