1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_H_
6 #define CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_H_
8 #include "base/macros.h"
9 #include "components/proximity_auth/proximity_auth_client.h"
13 class EasyUnlockServiceRegular
;
15 // A Chrome-specific implementation of the ProximityAuthClient interface.
16 // There is one |ChromeProximityAuthClient| per |Profile|.
17 class ChromeProximityAuthClient
: public proximity_auth::ProximityAuthClient
{
19 explicit ChromeProximityAuthClient(Profile
* profile
);
20 ~ChromeProximityAuthClient() override
;
22 // proximity_auth::ProximityAuthClient:
23 std::string
GetAuthenticatedUsername() const override
;
24 void UpdateScreenlockState(proximity_auth::ScreenlockState state
) override
;
25 void FinalizeUnlock(bool success
) override
;
26 PrefService
* GetPrefService() override
;
27 scoped_ptr
<proximity_auth::SecureMessageDelegate
>
28 CreateSecureMessageDelegate() override
;
29 scoped_ptr
<proximity_auth::CryptAuthClientFactory
>
30 CreateCryptAuthClientFactory() override
;
31 cryptauth::DeviceClassifier
GetDeviceClassifier() override
;
32 std::string
GetAccountId() override
;
33 proximity_auth::CryptAuthEnrollmentManager
* GetCryptAuthEnrollmentManager()
35 proximity_auth::CryptAuthDeviceManager
* GetCryptAuthDeviceManager() override
;
36 void FinalizeSignin(const std::string
& secret
) override
;
39 // Returns the EasyUnlockService instance used inside user sessions.
40 EasyUnlockServiceRegular
* GetEasyUnlockServiceRegular();
42 Profile
* const profile_
;
44 DISALLOW_COPY_AND_ASSIGN(ChromeProximityAuthClient
);
47 #endif // CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_H_