Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: chrome/browser/signin/chrome_proximity_auth_client.cc

Issue 1308393007: Add CryptAuth managers to EasyUnlockServiceRegular (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows compile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « chrome/browser/signin/chrome_proximity_auth_client.h ('k') | chrome/browser/signin/easy_unlock_service_regular.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698