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

Side by Side Diff: chrome/browser/signin/local_auth.h

Issue 875983008: Revert "Only store leading 13 bits of password hash." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/signin/local_auth.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // The local-auth module allows for user authentication in the case when 5 // The local-auth module allows for user authentication in the case when
6 // on-line authentication is not possible (e.g. there is no network 6 // on-line authentication is not possible (e.g. there is no network
7 // connection). 7 // connection).
8 8
9 #ifndef CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_ 9 #ifndef CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_
10 #define CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_ 10 #define CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "base/gtest_prod_util.h"
15
16 class LocalAuthTest;
17 class Profile; 14 class Profile;
18 15
19 namespace user_prefs { 16 namespace user_prefs {
20 class PrefRegistrySyncable; 17 class PrefRegistrySyncable;
21 } 18 }
22 19
23 class LocalAuth { 20 namespace chrome {
24 public:
25 static void RegisterLocalAuthPrefs(
26 user_prefs::PrefRegistrySyncable* registry);
27 21
28 static void SetLocalAuthCredentials(size_t profile_info_index, 22 void RegisterLocalAuthPrefs(user_prefs::PrefRegistrySyncable* registry);
29 const std::string& password);
30 23
24 void SetLocalAuthCredentials(size_t profile_info_index,
25 const std::string& password);
31 26
32 static void SetLocalAuthCredentials(const Profile* profile, 27 void SetLocalAuthCredentials(const Profile* profile,
33 const std::string& password); 28 const std::string& password);
34 29
35 static bool ValidateLocalAuthCredentials(size_t profile_info_index, 30 bool ValidateLocalAuthCredentials(size_t profile_info_index,
36 const std::string& password); 31 const std::string& password);
37 32
38 static bool ValidateLocalAuthCredentials(const Profile* profile, 33 bool ValidateLocalAuthCredentials(const Profile* profile,
39 const std::string& password); 34 const std::string& password);
40 35
41 private: 36 } // namespace chrome
42 FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, SetUpgradeAndCheckCredentials);
43 FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, TruncateStringEvenly);
44 FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, TruncateStringUnevenly);
45
46 // Return only the first |len_bits| bits of the string |str|. Defined here for
47 // testing.
48 static std::string TruncateStringByBits(const std::string& str,
49 const size_t len_bits);
50
51 static void SetLocalAuthCredentialsWithEncoding(size_t profile_info_index,
52 const std::string& password,
53 char encoding_version);
54 };
55 37
56 #endif // CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_ 38 #endif // CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/signin/local_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698