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

Unified Diff: chrome/browser/signin/easy_unlock_service_regular.h

Issue 1022233002: [Smart Lock] Add UMA metrics to measure duration of unlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hook into the existing PowerMonitor observer Created 5 years, 9 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 | « chrome/browser/signin/easy_unlock_service.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service_regular.h
diff --git a/chrome/browser/signin/easy_unlock_service_regular.h b/chrome/browser/signin/easy_unlock_service_regular.h
index 6b34afef928865ae1645806a167e58b3ba03188d..324d234c9cdebd946e6c42133934d86d021f14ae 100644
--- a/chrome/browser/signin/easy_unlock_service_regular.h
+++ b/chrome/browser/signin/easy_unlock_service_regular.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_change_registrar.h"
+#include "base/time/time.h"
#include "chrome/browser/signin/easy_unlock_service.h"
#include "chrome/browser/signin/screenlock_bridge.h"
@@ -67,6 +68,7 @@ class EasyUnlockServiceRegular : public EasyUnlockService,
void ShutdownInternal() override;
bool IsAllowedInternal() const override;
void OnWillFinalizeUnlock(bool success) override;
+ void OnSuspendDone() override;
// ScreenlockBridge::Observer implementation:
void OnScreenDidLock(
@@ -75,6 +77,7 @@ class EasyUnlockServiceRegular : public EasyUnlockService,
ScreenlockBridge::LockHandler::ScreenType screen_type) override;
void OnFocusedUserChanged(const std::string& user_id) override;
+
// Callback when the controlling pref changes.
void OnPrefsChanged();
@@ -116,6 +119,12 @@ class EasyUnlockServiceRegular : public EasyUnlockService,
// password-based unlocks for metrics.
bool will_unlock_using_easy_unlock_;
+ // The timestamp for the most recent time when the lock screen was shown. The
+ // lock screen is typically shown when the user awakens her computer from
+ // sleep -- e.g. by opening the lid -- but can also be shown if the screen is
+ // locked but the computer does not go to sleep.
+ base::TimeTicks lock_screen_last_shown_timestamp_;
+
base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular);
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698