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

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 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..89ef5dde31bd5726f0f64f9222b7b3adde193eea 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/screen_locker.h
@@ -131,6 +131,11 @@ class ScreenLocker : public AuthStatusConsumer {
friend class test::WebUIScreenLockerTester;
friend class ScreenLockerDelegate;
+ // Track whether the user used pin or password to unlock the lock screen.
+ // Values corrospond to UMA histograms, do not modify, or add or delete other
+ // than directly before AUTH_COUNT.
+ enum UnlockType { AUTH_PASSWORD = 0, AUTH_PIN, AUTH_COUNT };
+
struct AuthenticationParametersCapture {
UserContext user_context;
};
@@ -167,23 +172,26 @@ 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.
static ScreenLocker* screen_locker_;
// The time when the screen locker object is created.
- base::Time start_time_;
+ base::Time start_time_ = base::Time::Now();
// The time when the authentication is started.
base::Time authentication_start_time_;
// Delegate to forward all login status events to.
// Tests can use this to receive login status events.
- AuthStatusConsumer* auth_status_consumer_;
+ AuthStatusConsumer* auth_status_consumer_ = nullptr;
// 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().
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698