| Index: chrome/browser/signin/chrome_proximity_auth_client.cc
|
| diff --git a/chrome/browser/signin/chrome_proximity_auth_client.cc b/chrome/browser/signin/chrome_proximity_auth_client.cc
|
| index b43ebe34aece73e4a3599f83a23ab7d11b91bda2..1502aedc5be36fe9b1a5a58b170ef7c53431a63f 100644
|
| --- a/chrome/browser/signin/chrome_proximity_auth_client.cc
|
| +++ b/chrome/browser/signin/chrome_proximity_auth_client.cc
|
| @@ -111,14 +111,25 @@ std::string ChromeProximityAuthClient::GetAccountId() {
|
|
|
| proximity_auth::CryptAuthEnrollmentManager*
|
| ChromeProximityAuthClient::GetCryptAuthEnrollmentManager() {
|
| - // TODO(tengs): Return the real manager instance once it is implemented in
|
| - // EasyUnlockService.
|
| - return nullptr;
|
| + EasyUnlockServiceRegular* easy_unlock_service = GetEasyUnlockServiceRegular();
|
| + if (!easy_unlock_service)
|
| + return nullptr;
|
| + return easy_unlock_service->GetCryptAuthEnrollmentManager();
|
| }
|
|
|
| proximity_auth::CryptAuthDeviceManager*
|
| ChromeProximityAuthClient::GetCryptAuthDeviceManager() {
|
| - // TODO(tengs): Return the real manager instance once it is implemented in
|
| - // EasyUnlockService.
|
| - return nullptr;
|
| + EasyUnlockServiceRegular* easy_unlock_service = GetEasyUnlockServiceRegular();
|
| + if (!easy_unlock_service)
|
| + return nullptr;
|
| + return easy_unlock_service->GetCryptAuthDeviceManager();
|
| +}
|
| +
|
| +EasyUnlockServiceRegular*
|
| +ChromeProximityAuthClient::GetEasyUnlockServiceRegular() {
|
| + EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_);
|
| + if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR)
|
| + return static_cast<EasyUnlockServiceRegular*>(easy_unlock_service);
|
| + else
|
| + return nullptr;
|
| }
|
|
|