| 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_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual void RecoverEncryptedData( | 69 virtual void RecoverEncryptedData( |
| 70 const std::string& old_password, | 70 const std::string& old_password, |
| 71 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; | 71 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; |
| 72 | 72 |
| 73 // Call this method to erase the user's encrypted data | 73 // Call this method to erase the user's encrypted data |
| 74 // and create a new cryptohome. |result| is the blob of auth | 74 // and create a new cryptohome. |result| is the blob of auth |
| 75 // data passed back through OnPasswordChangeDetected(). | 75 // data passed back through OnPasswordChangeDetected(). |
| 76 virtual void ResyncEncryptedData( | 76 virtual void ResyncEncryptedData( |
| 77 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; | 77 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; |
| 78 | 78 |
| 79 // Attempt to authenticate online again. |
| 80 virtual void RetryAuth(Profile* profile, |
| 81 const std::string& username, |
| 82 const std::string& password, |
| 83 const std::string& login_token, |
| 84 const std::string& login_captcha) = 0; |
| 85 |
| 79 // Perform basic canonicalization of |email_address|, taking into account | 86 // Perform basic canonicalization of |email_address|, taking into account |
| 80 // that gmail does not consider '.' or caps inside a username to matter. | 87 // that gmail does not consider '.' or caps inside a username to matter. |
| 81 // It also ignores everything after a '+'. | 88 // It also ignores everything after a '+'. |
| 82 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per | 89 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per |
| 83 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# | 90 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# |
| 84 static std::string Canonicalize(const std::string& email_address); | 91 static std::string Canonicalize(const std::string& email_address); |
| 85 | 92 |
| 86 protected: | 93 protected: |
| 87 LoginStatusConsumer* consumer_; | 94 LoginStatusConsumer* consumer_; |
| 88 | 95 |
| 89 private: | 96 private: |
| 90 DISALLOW_COPY_AND_ASSIGN(Authenticator); | 97 DISALLOW_COPY_AND_ASSIGN(Authenticator); |
| 91 }; | 98 }; |
| 92 | 99 |
| 93 } // namespace chromeos | 100 } // namespace chromeos |
| 94 | 101 |
| 95 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ | 102 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ |
| OLD | NEW |