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

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

Issue 862103002: Only store leading 13 bits of password hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make LocalAuth a class so methods can be private and exposed only to tests. Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/signin/local_auth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/local_auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698