OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_signin_client.h" | 5 #include "chrome/browser/signin/chrome_signin_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 ProfileMetrics::UpdateReportedProfilesStatistics(profile_manager); | 241 ProfileMetrics::UpdateReportedProfilesStatistics(profile_manager); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 void ChromeSigninClient::PostSignedIn(const std::string& account_id, | 245 void ChromeSigninClient::PostSignedIn(const std::string& account_id, |
246 const std::string& username, | 246 const std::string& username, |
247 const std::string& password) { | 247 const std::string& password) { |
248 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 248 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
249 // Don't store password hash except when lock is available for the user. | 249 // Don't store password hash except when lock is available for the user. |
250 if (!password.empty() && profiles::IsLockAvailable(profile_)) | 250 if (!password.empty() && profiles::IsLockAvailable(profile_)) |
251 LocalAuth::SetLocalAuthCredentials(profile_, password); | 251 chrome::SetLocalAuthCredentials(profile_, password); |
252 #endif | 252 #endif |
253 } | 253 } |
254 | 254 |
255 void ChromeSigninClient::OnErrorChanged() { | 255 void ChromeSigninClient::OnErrorChanged() { |
256 // Some tests don't have a ProfileManager. | 256 // Some tests don't have a ProfileManager. |
257 if (g_browser_process->profile_manager() == nullptr) | 257 if (g_browser_process->profile_manager() == nullptr) |
258 return; | 258 return; |
259 | 259 |
260 ProfileInfoCache& cache = g_browser_process->profile_manager()-> | 260 ProfileInfoCache& cache = g_browser_process->profile_manager()-> |
261 GetProfileInfoCache(); | 261 GetProfileInfoCache(); |
262 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); | 262 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
263 if (index == std::string::npos) | 263 if (index == std::string::npos) |
264 return; | 264 return; |
265 | 265 |
266 cache.SetProfileIsAuthErrorAtIndex(index, | 266 cache.SetProfileIsAuthErrorAtIndex(index, |
267 signin_error_controller_->HasError()); | 267 signin_error_controller_->HasError()); |
268 } | 268 } |
OLD | NEW |