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 <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "chrome/browser/signin/chrome_proximity_auth_client.h" | 17 #include "chrome/browser/signin/chrome_proximity_auth_client.h" |
18 #include "chrome/browser/signin/easy_unlock_auth_attempt.h" | 18 #include "chrome/browser/signin/easy_unlock_auth_attempt.h" |
19 #include "chrome/browser/signin/easy_unlock_metrics.h" | 19 #include "chrome/browser/signin/easy_unlock_metrics.h" |
20 #include "chrome/browser/signin/easy_unlock_screenlock_state_handler.h" | 20 #include "chrome/browser/signin/easy_unlock_screenlock_state_handler.h" |
| 21 #include "components/cryptauth/remote_device.h" |
21 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
22 #include "components/proximity_auth/remote_device.h" | |
23 #include "components/proximity_auth/screenlock_state.h" | 23 #include "components/proximity_auth/screenlock_state.h" |
24 | 24 |
25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
26 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" | 26 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" |
27 #endif | 27 #endif |
28 | 28 |
29 class AccountId; | 29 class AccountId; |
30 | 30 |
31 namespace base { | 31 namespace base { |
32 class DictionaryValue; | 32 class DictionaryValue; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 EasyUnlockScreenlockStateHandler::HardlockState state); | 296 EasyUnlockScreenlockStateHandler::HardlockState state); |
297 | 297 |
298 // Returns the authentication event for a recent password sign-in or unlock, | 298 // Returns the authentication event for a recent password sign-in or unlock, |
299 // according to the current state of the service. | 299 // according to the current state of the service. |
300 EasyUnlockAuthEvent GetPasswordAuthEvent() const; | 300 EasyUnlockAuthEvent GetPasswordAuthEvent() const; |
301 | 301 |
302 // Called by subclasses when remote devices allowed to unlock the screen | 302 // Called by subclasses when remote devices allowed to unlock the screen |
303 // are loaded for |account_id|. | 303 // are loaded for |account_id|. |
304 void SetProximityAuthDevices( | 304 void SetProximityAuthDevices( |
305 const AccountId& account_id, | 305 const AccountId& account_id, |
306 const proximity_auth::RemoteDeviceList& remote_devices); | 306 const cryptauth::RemoteDeviceList& remote_devices); |
307 | 307 |
308 private: | 308 private: |
309 // A class to detect whether a bluetooth adapter is present. | 309 // A class to detect whether a bluetooth adapter is present. |
310 class BluetoothDetector; | 310 class BluetoothDetector; |
311 | 311 |
312 // Initializes the service after EasyUnlockAppManager is ready. | 312 // Initializes the service after EasyUnlockAppManager is ready. |
313 void InitializeOnAppManagerReady(); | 313 void InitializeOnAppManagerReady(); |
314 | 314 |
315 // Gets |screenlock_state_handler_|. Returns NULL if Easy Unlock is not | 315 // Gets |screenlock_state_handler_|. Returns NULL if Easy Unlock is not |
316 // allowed. Otherwise, if |screenlock_state_handler_| is not set, an instance | 316 // allowed. Otherwise, if |screenlock_state_handler_| is not set, an instance |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 bool tpm_key_checked_; | 374 bool tpm_key_checked_; |
375 | 375 |
376 base::ObserverList<EasyUnlockServiceObserver> observers_; | 376 base::ObserverList<EasyUnlockServiceObserver> observers_; |
377 | 377 |
378 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; | 378 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; |
379 | 379 |
380 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); | 380 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); |
381 }; | 381 }; |
382 | 382 |
383 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 383 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
OLD | NEW |