summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiyuan <xiyuan@chromium.org>2014-11-10 15:38:25 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-10 23:38:38 +0000
commit1867afc9d14407dfc3e820236b82421f356fa2c0 (patch)
treec77b922e1175186eae11c2d08a759072cb228eee
parent67ad8b57560679cd2dfc2890c207b645e3a46f49 (diff)
downloadchromium_src-1867afc9d14407dfc3e820236b82421f356fa2c0.zip
chromium_src-1867afc9d14407dfc3e820236b82421f356fa2c0.tar.gz
chromium_src-1867afc9d14407dfc3e820236b82421f356fa2c0.tar.bz2
easy-unlock: Update hardlock UMA.
- Add UMA for two new hardlock states - Change to use "switch" for hardlock state so that any new state would not be missed again in the future. BUG=none. Review URL: https://codereview.chromium.org/689553003 Cr-Commit-Position: refs/heads/master@{#303534}
-rw-r--r--chrome/browser/chromeos/login/easy_unlock/easy_unlock_metrics.h5
-rw-r--r--chrome/browser/signin/easy_unlock_service_signin_chromeos.cc26
-rw-r--r--tools/metrics/histograms/histograms.xml2
3 files changed, 27 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_metrics.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_metrics.h
index b6728f6..a4f1d11 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_metrics.h
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_metrics.h
@@ -49,6 +49,11 @@ enum EasyUnlockLoginEvent {
// Password is used for sign-in because phone is not right next to the
// Chromebook.
PASSWORD_SIGN_IN_TX_POWER_TOO_HIGH = 15,
+ // Password is used for sign-in because Easy sign-in failed.
+ PASSWORD_SIGN_IN_LOGIN_FAILED = 16,
+ // Password is used for sign-in because pairing data is changed for a "new"
+ // Chromebook (where there was no previous pairing data)..
+ PASSWORD_SIGN_IN_PAIRING_ADDED = 17,
EASY_SIGN_IN_LOGIN_EVENT_COUNT // Must be the last.
};
diff --git a/chrome/browser/signin/easy_unlock_service_signin_chromeos.cc b/chrome/browser/signin/easy_unlock_service_signin_chromeos.cc
index ec49823..207f84a 100644
--- a/chrome/browser/signin/easy_unlock_service_signin_chromeos.cc
+++ b/chrome/browser/signin/easy_unlock_service_signin_chromeos.cc
@@ -191,12 +191,26 @@ void EasyUnlockServiceSignin::RecordPasswordLoginEvent(
if (!GetRemoteDevices() ||
GetHardlockState() == EasyUnlockScreenlockStateHandler::NO_PAIRING) {
event = chromeos::PASSWORD_SIGN_IN_NO_PAIRING;
- } else if (GetHardlockState() ==
- EasyUnlockScreenlockStateHandler::PAIRING_CHANGED) {
- event = chromeos::PASSWORD_SIGN_IN_PAIRING_CHANGED;
- } else if (GetHardlockState() ==
- EasyUnlockScreenlockStateHandler::USER_HARDLOCK) {
- event = chromeos::PASSWORD_SIGN_IN_USER_HARDLOCK;
+ } else if (GetHardlockState() !=
+ EasyUnlockScreenlockStateHandler::NO_HARDLOCK) {
+ switch (GetHardlockState()) {
+ case EasyUnlockScreenlockStateHandler::NO_HARDLOCK:
+ case EasyUnlockScreenlockStateHandler::NO_PAIRING:
+ NOTREACHED();
+ break;
+ case EasyUnlockScreenlockStateHandler::USER_HARDLOCK:
+ event = chromeos::PASSWORD_SIGN_IN_USER_HARDLOCK;
+ break;
+ case EasyUnlockScreenlockStateHandler::PAIRING_CHANGED:
+ event = chromeos::PASSWORD_SIGN_IN_PAIRING_CHANGED;
+ break;
+ case EasyUnlockScreenlockStateHandler::LOGIN_FAILED:
+ event = chromeos::PASSWORD_SIGN_IN_LOGIN_FAILED;
+ break;
+ case EasyUnlockScreenlockStateHandler::PAIRING_ADDED:
+ event = chromeos::PASSWORD_SIGN_IN_PAIRING_ADDED;
+ break;
+ }
} else if (!screenlock_state_handler()) {
event = chromeos::PASSWORD_SIGN_IN_SERVICE_NOT_ACTIVE;
} else {
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index ad50e5f..e178c03 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -42758,6 +42758,8 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="13" label="Password sign-in: Phone not supported"/>
<int value="14" label="Password sign-in: Phone authenticated"/>
<int value="15" label="Password sign-in: Tx power too high"/>
+ <int value="16" label="Password sign-in: Easy sign-in failed"/>
+ <int value="17" label="Password sign-in: Pairing added"/>
</enum>
<enum name="EasyUnlockNotificationEvent" type="int">