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

Unified Diff: chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc

Issue 2739513002: Settings reset prompt: add UMA metrics reporting. (Closed)
Patch Set: More comments... Created 3 years, 9 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
Index: chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc
index d4025848575f2a05ac8bbc4c7e470622618f9f19..5d3041b84c2d592bb0034855378f5a2acf55280b 100644
--- a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc
+++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.cc
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
+#include "base/metrics/histogram_macros.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/google/google_brand.h"
#include "chrome/browser/prefs/session_startup_pref.h"
@@ -276,6 +277,22 @@ SettingsResetPromptModel::extensions_to_disable() const {
return extensions_to_disable_;
}
+void SettingsResetPromptModel::ReportUmaMetrics() const {
+ UMA_HISTOGRAM_BOOLEAN("SettingsResetPrompt.PromptRequired",
+ ShouldPromptForReset());
+ UMA_HISTOGRAM_ENUMERATION("SettingsResetPrompt.ResetState_DefaultSearch",
+ default_search_reset_state(), RESET_STATE_MAX);
+ UMA_HISTOGRAM_ENUMERATION("SettingsResetPrompt.ResetState_StartupUrls",
+ startup_urls_reset_state(), RESET_STATE_MAX);
+ UMA_HISTOGRAM_ENUMERATION("SettingsResetPrompt.ResetState_Homepage",
+ homepage_reset_state(), RESET_STATE_MAX);
+ UMA_HISTOGRAM_COUNTS_100("SettingsResetPrompt.NumberOfExtensionsToDisable",
+ extensions_to_disable().size());
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "SettingsResetPrompt.DelayBeforePromptParam",
+ prompt_config_->delay_before_prompt().InSeconds());
+}
+
// static
void SettingsResetPromptModel::OnSettingsFetched(
Profile* profile,

Powered by Google App Engine
This is Rietveld 408576698