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

Unified Diff: chrome/browser/chromeos/login/webui_login_display.h

Issue 12321136: Password in user pods clears after minute of idle state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 years, 10 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/webui_login_display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/webui_login_display.h
diff --git a/chrome/browser/chromeos/login/webui_login_display.h b/chrome/browser/chromeos/login/webui_login_display.h
index bb149f84fc54126187f51753bb58c8bb2a3096ea..913201c440ddc3149d8820c3899a2a85fd5fd3dc 100644
--- a/chrome/browser/chromeos/login/webui_login_display.h
+++ b/chrome/browser/chromeos/login/webui_login_display.h
@@ -8,7 +8,9 @@
#include <string>
#include <vector>
+#include "ash/wm/user_activity_observer.h"
#include "base/compiler_specific.h"
+#include "base/timer.h"
#include "chrome/browser/chromeos/login/login_display.h"
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h"
@@ -19,7 +21,8 @@ namespace chromeos {
// WebUI-based login UI implementation.
class WebUILoginDisplay : public LoginDisplay,
public NativeWindowDelegate,
- public SigninScreenHandlerDelegate {
+ public SigninScreenHandlerDelegate,
+ public ash::UserActivityObserver {
public:
explicit WebUILoginDisplay(LoginDisplay::Delegate* delegate);
virtual ~WebUILoginDisplay();
@@ -78,7 +81,13 @@ class WebUILoginDisplay : public LoginDisplay,
virtual void SetDisplayEmail(const std::string& email) OVERRIDE;
virtual void Signout() OVERRIDE;
+ // UserActivityDetector implementation:
+ virtual void OnUserActivity() OVERRIDE;
+
private:
+ void StartPasswordClearTimer();
+ void OnPasswordClearTimerExpired();
+
// Set of Users that are visible.
UserList users_;
@@ -91,6 +100,9 @@ class WebUILoginDisplay : public LoginDisplay,
// Whether to show add new user.
bool show_new_user_;
+ // Timer for measuring idle state duration before password clear.
+ base::OneShotTimer<WebUILoginDisplay> password_clear_timer_;
+
// Reference to the WebUI handling layer for the login screen
LoginDisplayWebUIHandler* webui_handler_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/webui_login_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698