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

Unified Diff: chrome/browser/chromeos/arc/arc_optin_uma.cc

Issue 2704383006: arc: Handle metrics for Auth operations. (Closed)
Patch Set: update histogram.xml to match change Arc.Auth to ArcAuth Created 3 years, 10 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/chromeos/arc/arc_optin_uma.cc
diff --git a/chrome/browser/chromeos/arc/arc_optin_uma.cc b/chrome/browser/chromeos/arc/arc_optin_uma.cc
index cea4e1c4a8762618f5ec4217a37c07fd0251ae4b..afed82857662f672b73ba6936e6bc496ae77ca3f 100644
--- a/chrome/browser/chromeos/arc/arc_optin_uma.cc
+++ b/chrome/browser/chromeos/arc/arc_optin_uma.cc
@@ -51,6 +51,20 @@ void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time,
->AddTime(elapsed_time);
}
+void UpdateAuthTiming(const char* histogram_name,
+ base::TimeDelta elapsed_time) {
+ base::Histogram::FactoryTimeGet(
+ histogram_name, base::TimeDelta::FromSeconds(1) /* minimum */,
+ base::TimeDelta::FromMinutes(3) /* maximum */, 50 /* bucket_count */,
+ base::HistogramBase::kUmaTargetedHistogramFlag)
+ ->AddTime(elapsed_time);
Ilya Sherman 2017/02/23 21:23:34 Please use the convenience wrapper base::UmaHistog
khmel 2017/02/23 21:57:45 Done.
+}
+
+void UpdateAuthAttempts(const char* histogram_name, int32_t value) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(histogram_name, value, 0 /* minimum */,
+ 5 /* maximum */, 6 /* bucket_count */);
Ilya Sherman 2017/02/23 21:23:34 Please use the convenience wrapper base::UmaHistog
khmel 2017/02/23 21:57:45 Thanks for detailed comment. I reserved it for pos
+}
+
void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state) {
UMA_HISTOGRAM_ENUMERATION("Arc.OptInSilentAuthCode", static_cast<int>(state),
static_cast<int>(OptInSilentAuthCode::SIZE));

Powered by Google App Engine
This is Rietveld 408576698