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

Side by Side Diff: chrome/browser/signin/chrome_proximity_auth_client.cc

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 years 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 base::Callback<void(const std::string& challenge)> callback) { 71 base::Callback<void(const std::string& challenge)> callback) {
72 #if defined(OS_CHROMEOS) 72 #if defined(OS_CHROMEOS)
73 EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_); 73 EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_);
74 if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR) { 74 if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR) {
75 PA_LOG(ERROR) << "Unable to get challenge when user is logged in."; 75 PA_LOG(ERROR) << "Unable to get challenge when user is logged in.";
76 callback.Run(std::string()); 76 callback.Run(std::string());
77 return; 77 return;
78 } 78 }
79 79
80 static_cast<EasyUnlockServiceSignin*>(easy_unlock_service) 80 static_cast<EasyUnlockServiceSignin*>(easy_unlock_service)
81 ->WrapChallengeForUserAndDevice(user_id, remote_public_key, 81 ->WrapChallengeForUserAndDevice(AccountId::FromUserEmail(user_id),
82 channel_binding_data, callback); 82 remote_public_key, channel_binding_data,
83 callback);
83 #else 84 #else
84 callback.Run(std::string()); 85 callback.Run(std::string());
85 #endif 86 #endif
86 } 87 }
87 88
88 PrefService* ChromeProximityAuthClient::GetPrefService() { 89 PrefService* ChromeProximityAuthClient::GetPrefService() {
89 return profile_->GetPrefs(); 90 return profile_->GetPrefs();
90 } 91 }
91 92
92 scoped_ptr<proximity_auth::SecureMessageDelegate> 93 scoped_ptr<proximity_auth::SecureMessageDelegate>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 154 }
154 155
155 EasyUnlockServiceRegular* 156 EasyUnlockServiceRegular*
156 ChromeProximityAuthClient::GetEasyUnlockServiceRegular() { 157 ChromeProximityAuthClient::GetEasyUnlockServiceRegular() {
157 EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_); 158 EasyUnlockService* easy_unlock_service = EasyUnlockService::Get(profile_);
158 if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR) 159 if (easy_unlock_service->GetType() == EasyUnlockService::TYPE_REGULAR)
159 return static_cast<EasyUnlockServiceRegular*>(easy_unlock_service); 160 return static_cast<EasyUnlockServiceRegular*>(easy_unlock_service);
160 else 161 else
161 return nullptr; 162 return nullptr;
162 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698