| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 ProfileMetrics::UpdateReportedProfilesStatistics(profile_manager); | 227 ProfileMetrics::UpdateReportedProfilesStatistics(profile_manager); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 void ChromeSigninClient::PostSignedIn(const std::string& account_id, | 231 void ChromeSigninClient::PostSignedIn(const std::string& account_id, |
| 232 const std::string& username, | 232 const std::string& username, |
| 233 const std::string& password) { | 233 const std::string& password) { |
| 234 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 234 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
| 235 // Don't store password hash except when lock is available for the user. | 235 // Don't store password hash except when lock is available for the user. |
| 236 if (!password.empty() && profiles::IsLockAvailable(profile_)) | 236 if (!password.empty() && profiles::IsLockAvailable(profile_)) |
| 237 chrome::SetLocalAuthCredentials(profile_, password); | 237 LocalAuth::SetLocalAuthCredentials(profile_, password); |
| 238 #endif | 238 #endif |
| 239 } | 239 } |
| 240 | 240 |
| 241 void ChromeSigninClient::OnErrorChanged() { | 241 void ChromeSigninClient::OnErrorChanged() { |
| 242 // Some tests don't have a ProfileManager. | 242 // Some tests don't have a ProfileManager. |
| 243 if (g_browser_process->profile_manager() == nullptr) | 243 if (g_browser_process->profile_manager() == nullptr) |
| 244 return; | 244 return; |
| 245 | 245 |
| 246 ProfileInfoCache& cache = g_browser_process->profile_manager()-> | 246 ProfileInfoCache& cache = g_browser_process->profile_manager()-> |
| 247 GetProfileInfoCache(); | 247 GetProfileInfoCache(); |
| 248 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); | 248 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
| 249 if (index == std::string::npos) | 249 if (index == std::string::npos) |
| 250 return; | 250 return; |
| 251 | 251 |
| 252 cache.SetProfileIsAuthErrorAtIndex(index, | 252 cache.SetProfileIsAuthErrorAtIndex(index, |
| 253 signin_error_controller_->HasError()); | 253 signin_error_controller_->HasError()); |
| 254 } | 254 } |
| OLD | NEW |