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_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 void OnCryptohomeKeysFetchedForChecking( | 248 void OnCryptohomeKeysFetchedForChecking( |
249 const std::string& user_id, | 249 const std::string& user_id, |
250 const std::set<std::string> paired_devices, | 250 const std::set<std::string> paired_devices, |
251 bool success, | 251 bool success, |
252 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); | 252 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); |
253 #endif | 253 #endif |
254 | 254 |
255 // Updates the service to state for handling system suspend. | 255 // Updates the service to state for handling system suspend. |
256 void PrepareForSuspend(); | 256 void PrepareForSuspend(); |
257 | 257 |
| 258 void EnsureTpmKeyPresentIfNeeded(); |
| 259 |
258 Profile* profile_; | 260 Profile* profile_; |
259 | 261 |
260 // Created lazily in |GetScreenlockStateHandler|. | 262 // Created lazily in |GetScreenlockStateHandler|. |
261 scoped_ptr<EasyUnlockScreenlockStateHandler> screenlock_state_handler_; | 263 scoped_ptr<EasyUnlockScreenlockStateHandler> screenlock_state_handler_; |
262 | 264 |
263 // The handler for the current auth attempt. Set iff an auth attempt is in | 265 // The handler for the current auth attempt. Set iff an auth attempt is in |
264 // progress. | 266 // progress. |
265 scoped_ptr<EasyUnlockAuthAttempt> auth_attempt_; | 267 scoped_ptr<EasyUnlockAuthAttempt> auth_attempt_; |
266 | 268 |
267 scoped_ptr<BluetoothDetector> bluetooth_detector_; | 269 scoped_ptr<BluetoothDetector> bluetooth_detector_; |
268 | 270 |
269 #if defined(OS_CHROMEOS) | 271 #if defined(OS_CHROMEOS) |
270 // Monitors suspend and wake state of ChromeOS. | 272 // Monitors suspend and wake state of ChromeOS. |
271 class PowerMonitor; | 273 class PowerMonitor; |
272 scoped_ptr<PowerMonitor> power_monitor_; | 274 scoped_ptr<PowerMonitor> power_monitor_; |
273 #endif | 275 #endif |
274 | 276 |
275 // Whether the service has been shut down. | 277 // Whether the service has been shut down. |
276 bool shut_down_; | 278 bool shut_down_; |
277 | 279 |
| 280 bool tpm_key_checked_; |
| 281 |
278 ObserverList<EasyUnlockServiceObserver> observers_; | 282 ObserverList<EasyUnlockServiceObserver> observers_; |
279 | 283 |
280 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; | 284 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; |
281 | 285 |
282 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); | 286 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); |
283 }; | 287 }; |
284 | 288 |
285 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 289 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
OLD | NEW |