OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ |
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time/time.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" | 16 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" |
16 #include "chrome/browser/signin/easy_unlock_service.h" | 17 #include "chrome/browser/signin/easy_unlock_service.h" |
17 #include "chrome/browser/signin/screenlock_bridge.h" | 18 #include "chrome/browser/signin/screenlock_bridge.h" |
18 #include "chromeos/login/login_state.h" | 19 #include "chromeos/login/login_state.h" |
19 | 20 |
20 // EasyUnlockService instance that should be used for signin profile. | 21 // EasyUnlockService instance that should be used for signin profile. |
21 class EasyUnlockServiceSignin : public EasyUnlockService, | 22 class EasyUnlockServiceSignin : public EasyUnlockService, |
22 public ScreenlockBridge::Observer, | 23 public ScreenlockBridge::Observer, |
23 public chromeos::LoginState::Observer { | 24 public chromeos::LoginState::Observer { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Whether failed attempts to load user data should be retried. | 113 // Whether failed attempts to load user data should be retried. |
113 // This is to handle case where cryptohome daemon is not started in time the | 114 // This is to handle case where cryptohome daemon is not started in time the |
114 // service attempts to load some data. Retries will be allowed only until the | 115 // service attempts to load some data. Retries will be allowed only until the |
115 // first data load finishes (even if it fails). | 116 // first data load finishes (even if it fails). |
116 bool allow_cryptohome_backoff_; | 117 bool allow_cryptohome_backoff_; |
117 | 118 |
118 // Whether the service has been successfully initialized, and has not been | 119 // Whether the service has been successfully initialized, and has not been |
119 // shut down. | 120 // shut down. |
120 bool service_active_; | 121 bool service_active_; |
121 | 122 |
| 123 // The timestamp for the most recent time when a user pod was focused. |
| 124 base::TimeTicks user_pod_last_focused_timestamp_; |
| 125 |
122 base::WeakPtrFactory<EasyUnlockServiceSignin> weak_ptr_factory_; | 126 base::WeakPtrFactory<EasyUnlockServiceSignin> weak_ptr_factory_; |
123 | 127 |
124 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceSignin); | 128 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceSignin); |
125 }; | 129 }; |
126 | 130 |
127 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ | 131 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_SIGNIN_CHROMEOS_H_ |
OLD | NEW |