| 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..cfec8eca3ee43395ad2fe1e6452f82718b5bc157 100644
|
| --- a/chrome/browser/chromeos/arc/arc_optin_uma.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_optin_uma.cc
|
| @@ -10,6 +10,16 @@
|
|
|
| namespace arc {
|
|
|
| +namespace {
|
| +
|
| +constexpr char kArcAuthHistogramPrefix[] = "ArcAuth.";
|
| +
|
| +std::string GetAuthHistogramName(const char* key) {
|
| + return std::string(kArcAuthHistogramPrefix) + key;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| void UpdateOptInActionUMA(OptInActionType type) {
|
| UMA_HISTOGRAM_ENUMERATION("Arc.OptInAction", static_cast<int>(type),
|
| static_cast<int>(OptInActionType::SIZE));
|
| @@ -51,6 +61,19 @@ void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time,
|
| ->AddTime(elapsed_time);
|
| }
|
|
|
| +void UpdateAuthTiming(const char* key, base::TimeDelta elapsed_time) {
|
| + base::Histogram::FactoryTimeGet(
|
| + GetAuthHistogramName(key), base::TimeDelta::FromSeconds(1) /* minimum */,
|
| + base::TimeDelta::FromMinutes(3) /* maximum */, 50 /* bucket_count */,
|
| + base::HistogramBase::kUmaTargetedHistogramFlag)
|
| + ->AddTime(elapsed_time);
|
| +}
|
| +
|
| +void UpdateAuthAttempts(const char* key, int32_t value) {
|
| + UMA_HISTOGRAM_CUSTOM_COUNTS(GetAuthHistogramName(key), value, 0 /* minimum */,
|
| + 5 /* maximum */, 6 /* bucket_count */);
|
| +}
|
| +
|
| void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state) {
|
| UMA_HISTOGRAM_ENUMERATION("Arc.OptInSilentAuthCode", static_cast<int>(state),
|
| static_cast<int>(OptInSilentAuthCode::SIZE));
|
|
|