| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void Cancel(); | 103 void Cancel(); |
| 104 | 104 |
| 105 // Perform basic canonicalization of |email_address|, taking into account | 105 // Perform basic canonicalization of |email_address|, taking into account |
| 106 // that gmail does not consider '.' or caps inside a username to matter. | 106 // that gmail does not consider '.' or caps inside a username to matter. |
| 107 // For example, c.masone@gmail.com == cMaSone@gmail.com, per | 107 // For example, c.masone@gmail.com == cMaSone@gmail.com, per |
| 108 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# | 108 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# |
| 109 static std::string Canonicalize(const std::string& email_address); | 109 static std::string Canonicalize(const std::string& email_address); |
| 110 | 110 |
| 111 // Callbacks from GaiaAuthenticator2 | 111 // Callbacks from GaiaAuthenticator2 |
| 112 virtual void OnClientLoginFailure( | 112 virtual void OnClientLoginFailure( |
| 113 const GaiaAuthConsumer::ClientLoginError& error); | 113 const GaiaAuthConsumer::GaiaAuthError& error); |
| 114 virtual void OnClientLoginSuccess( | 114 virtual void OnClientLoginSuccess( |
| 115 const GaiaAuthConsumer::ClientLoginResult& result); | 115 const GaiaAuthConsumer::ClientLoginResult& result); |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 | 118 |
| 119 // If we don't have the system salt yet, loads it from the CryptohomeLibrary. | 119 // If we don't have the system salt yet, loads it from the CryptohomeLibrary. |
| 120 void LoadSystemSalt(); | 120 void LoadSystemSalt(); |
| 121 | 121 |
| 122 // If we haven't already, looks in a file called |filename| next to | 122 // If we haven't already, looks in a file called |filename| next to |
| 123 // the browser executable for a "localaccount" name, and retrieves it | 123 // the browser executable for a "localaccount" name, and retrieves it |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure); | 216 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure); |
| 217 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied); | 217 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied); |
| 218 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin); | 218 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin); |
| 219 | 219 |
| 220 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator); | 220 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator); |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 } // namespace chromeos | 223 } // namespace chromeos |
| 224 | 224 |
| 225 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ | 225 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ |
| OLD | NEW |