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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/signin/chrome_proximity_auth_client.h" 5 #include "chrome/browser/signin/chrome_proximity_auth_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return device_classifier; 104 return device_classifier;
105 } 105 }
106 106
107 std::string ChromeProximityAuthClient::GetAccountId() { 107 std::string ChromeProximityAuthClient::GetAccountId() {
108 return SigninManagerFactory::GetForProfile(profile_) 108 return SigninManagerFactory::GetForProfile(profile_)
109 ->GetAuthenticatedAccountId(); 109 ->GetAuthenticatedAccountId();
110 } 110 }
111 111
112 proximity_auth::CryptAuthEnrollmentManager* 112 proximity_auth::CryptAuthEnrollmentManager*
113 ChromeProximityAuthClient::GetCryptAuthEnrollmentManager() { 113 ChromeProximityAuthClient::GetCryptAuthEnrollmentManager() {
114 // TODO(tengs): Return the real manager instance once it is implemented in 114 EasyUnlockServiceRegular* easy_unlock_service = GetEasyUnlockServiceRegular();
115 // EasyUnlockService. 115 if (!easy_unlock_service)
116 return nullptr; 116 return nullptr;
117 return easy_unlock_service->GetCryptAuthEnrollmentManager();
117 } 118 }
118 119
119 proximity_auth::CryptAuthDeviceManager* 120 proximity_auth::CryptAuthDeviceManager*
120 ChromeProximityAuthClient::GetCryptAuthDeviceManager() { 121 ChromeProximityAuthClient::GetCryptAuthDeviceManager() {
121 // TODO(tengs): Return the real manager instance once it is implemented in 122 EasyUnlockServiceRegular* easy_unlock_service = GetEasyUnlockServiceRegular();
122 // EasyUnlockService. 123 if (!easy_unlock_service)
123 return nullptr; 124 return nullptr;
125 return easy_unlock_service->GetCryptAuthDeviceManager();
124 } 126 }
127
128 EasyUnlockServiceRegular*
129 ChromeProximityAuthClient::GetEasyUnlockServiceRegular() {
130 EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_);
131 if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR)
132 return static_cast<EasyUnlockServiceRegular*>(easy_unlock_service);
133 else
134 return nullptr;
135 }
OLDNEW
« 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