Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / metrics / signin_status_metrics_provider_base.cc
blobbe807beb6eb9051867eb82e0248b58667b162950
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/metrics/signin_status_metrics_provider_base.h"
7 #include "base/metrics/histogram.h"
9 SigninStatusMetricsProviderBase::SigninStatusMetricsProviderBase()
10 : signin_status_(UNKNOWN_SIGNIN_STATUS) {
13 SigninStatusMetricsProviderBase::~SigninStatusMetricsProviderBase() {
16 void SigninStatusMetricsProviderBase::RecordSigninStatusHistogram(
17 SigninStatus signin_status) {
18 UMA_HISTOGRAM_ENUMERATION(
19 "UMA.ProfileSignInStatus", signin_status, SIGNIN_STATUS_MAX);
22 void SigninStatusMetricsProviderBase::SetSigninStatus(SigninStatus new_status) {
23 // The recorded sign-in status value can't be changed once it's recorded as
24 // error until the next UMA upload.
25 if (signin_status_ == ERROR_GETTING_SIGNIN_STATUS)
26 return;
27 signin_status_ = new_status;
30 void SigninStatusMetricsProviderBase::ResetSigninStatus() {
31 signin_status_ = UNKNOWN_SIGNIN_STATUS;