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

Side by Side Diff: chrome/browser/chromeos/login/google_authenticator.h

Issue 3436031: [Chrome OS] Refactor Canonicalize() method into base class to prepare for new Authenticator subclass (Closed)
Patch Set: aaaaand fix one more header Created 10 years, 3 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
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void CheckLocalaccount(const LoginFailure& error); 78 void CheckLocalaccount(const LoginFailure& error);
79 void OnLoginFailure(const LoginFailure& error); 79 void OnLoginFailure(const LoginFailure& error);
80 80
81 // Call these methods on the UI thread. 81 // Call these methods on the UI thread.
82 void RecoverEncryptedData( 82 void RecoverEncryptedData(
83 const std::string& old_password, 83 const std::string& old_password,
84 const GaiaAuthConsumer::ClientLoginResult& credentials); 84 const GaiaAuthConsumer::ClientLoginResult& credentials);
85 void ResyncEncryptedData( 85 void ResyncEncryptedData(
86 const GaiaAuthConsumer::ClientLoginResult& credentials); 86 const GaiaAuthConsumer::ClientLoginResult& credentials);
87 87
88 // Perform basic canonicalization of |email_address|, taking into account
89 // that gmail does not consider '.' or caps inside a username to matter.
90 // For example, c.masone@gmail.com == cMaSone@gmail.com, per
91 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313#
92 static std::string Canonicalize(const std::string& email_address);
93
94 // Callbacks from GaiaAuthenticator2 88 // Callbacks from GaiaAuthenticator2
95 virtual void OnClientLoginFailure( 89 virtual void OnClientLoginFailure(
96 const GoogleServiceAuthError& error); 90 const GoogleServiceAuthError& error);
97 virtual void OnClientLoginSuccess( 91 virtual void OnClientLoginSuccess(
98 const GaiaAuthConsumer::ClientLoginResult& credentials); 92 const GaiaAuthConsumer::ClientLoginResult& credentials);
99 93
100 private: 94 private:
101 95
102 // If we don't have the system salt yet, loads it from the CryptohomeLibrary. 96 // If we don't have the system salt yet, loads it from the CryptohomeLibrary.
103 void LoadSystemSalt(); 97 void LoadSystemSalt();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure); 199 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginNetFailure);
206 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied); 200 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, LoginDenied);
207 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin); 201 FRIEND_TEST_ALL_PREFIXES(GoogleAuthenticatorTest, TwoFactorLogin);
208 202
209 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator); 203 DISALLOW_COPY_AND_ASSIGN(GoogleAuthenticator);
210 }; 204 };
211 205
212 } // namespace chromeos 206 } // namespace chromeos
213 207
214 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_ 208 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GOOGLE_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698