Index: chrome/browser/signin/local_auth.h |
diff --git a/chrome/browser/signin/local_auth.h b/chrome/browser/signin/local_auth.h |
index 2342a8142a2da6591238c44e2bba0a85401cd6b0..570b5bc345a81e5ea9aeedc551fb9e183b7e1f96 100644 |
--- a/chrome/browser/signin/local_auth.h |
+++ b/chrome/browser/signin/local_auth.h |
@@ -11,28 +11,46 @@ |
#include <string> |
+#include "base/gtest_prod_util.h" |
+ |
+class LocalAuthTest; |
class Profile; |
namespace user_prefs { |
class PrefRegistrySyncable; |
} |
-namespace chrome { |
+class LocalAuth { |
+ public: |
+ static void RegisterLocalAuthPrefs( |
+ user_prefs::PrefRegistrySyncable* registry); |
+ |
+ static void SetLocalAuthCredentials(size_t profile_info_index, |
+ const std::string& password); |
+ |
-void RegisterLocalAuthPrefs(user_prefs::PrefRegistrySyncable* registry); |
+ static void SetLocalAuthCredentials(const Profile* profile, |
+ const std::string& password); |
-void SetLocalAuthCredentials(size_t profile_info_index, |
- const std::string& password); |
+ static bool ValidateLocalAuthCredentials(size_t profile_info_index, |
+ const std::string& password); |
-void SetLocalAuthCredentials(const Profile* profile, |
- const std::string& password); |
+ static bool ValidateLocalAuthCredentials(const Profile* profile, |
+ const std::string& password); |
-bool ValidateLocalAuthCredentials(size_t profile_info_index, |
- const std::string& password); |
+ private: |
+ FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, SetUpgradeAndCheckCredentials); |
+ FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, TruncateStringEvenly); |
+ FRIEND_TEST_ALL_PREFIXES(LocalAuthTest, TruncateStringUnevenly); |
-bool ValidateLocalAuthCredentials(const Profile* profile, |
- const std::string& password); |
+ // Return only the first |len_bits| bits of the string |str|. Defined here for |
+ // testing. |
+ static std::string TruncateStringByBits(const std::string& str, |
+ const size_t len_bits); |
-} // namespace chrome |
+ static void SetLocalAuthCredentialsWithEncoding(size_t profile_info_index, |
+ const std::string& password, |
+ char encoding_version); |
+}; |
#endif // CHROME_BROWSER_SIGNIN_LOCAL_AUTH_H_ |