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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.h

Issue 2208583006: UMA for pin unlock success/failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 3 errors. Created 4 years, 4 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/login/lock/screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.h b/chrome/browser/chromeos/login/lock/screen_locker.h
index 856162047e922dc4e36fb28e303bbc31459e5e23..4044b6e801622ab5fa01534312410575d3cbfded 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/screen_locker.h
@@ -49,6 +49,18 @@ class WebUIScreenLockerTester;
// instance of itself which will be deleted when the system is unlocked.
class ScreenLocker : public AuthStatusConsumer {
public:
+ enum UnlockSuccess {
jdufault 2016/08/16 17:55:02 Is it possible to make these enums private?
sammiequon 2016/08/16 19:22:11 Done.
+ AUTH_SUCCESS_PASSWORD = 0,
+ AUTH_SUCCESS_PIN,
+ AUTH_SUCCESS_COUNT
+ };
+
+ enum UnlockFailure {
jdufault 2016/08/16 17:55:02 Do these need to be separate enums? Is it possible
sammiequon 2016/08/16 19:22:11 Done.
+ AUTH_FAILURE_PASSWORD = 0,
+ AUTH_FAILURE_PIN,
+ AUTH_FAILURE_COUNT
+ };
+
explicit ScreenLocker(const user_manager::UserList& users);
// Returns the default instance if it has been created.
@@ -167,7 +179,7 @@ class ScreenLocker : public AuthStatusConsumer {
// True if the screen is locked, or false otherwise. This changes
// from false to true, but will never change from true to
// false. Instead, ScreenLocker object gets deleted when unlocked.
- bool locked_;
+ bool locked_ = false;
// Reference to the single instance of the screen locker object.
// This is used to make sure there is only one screen locker instance.
@@ -183,7 +195,10 @@ class ScreenLocker : public AuthStatusConsumer {
AuthStatusConsumer* auth_status_consumer_;
// Number of bad login attempts in a row.
- int incorrect_passwords_count_;
+ int incorrect_passwords_count_ = 0;
+
+ // Whether the last password entered was a pin or not.
+ bool is_pin_attempt_ = false;
// Copy of parameters passed to last call of OnLoginSuccess for usage in
// UnlockOnLoginSuccess().

Powered by Google App Engine
This is Rietveld 408576698