| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 signin manager encapsulates some functionality tracking | 5 // The signin manager encapsulates some functionality tracking |
| 6 // which user is signed in. When a user is signed in, a ClientLogin | 6 // which user is signed in. When a user is signed in, a ClientLogin |
| 7 // request is run on their behalf. Auth tokens are fetched from Google | 7 // request is run on their behalf. Auth tokens are fetched from Google |
| 8 // and the results are stored in the TokenService. | 8 // and the results are stored in the TokenService. |
| 9 // | 9 // |
| 10 // **NOTE** on semantics of SigninManager: | 10 // **NOTE** on semantics of SigninManager: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 virtual void StartSignIn(const std::string& username, | 76 virtual void StartSignIn(const std::string& username, |
| 77 const std::string& password, | 77 const std::string& password, |
| 78 const std::string& login_token, | 78 const std::string& login_token, |
| 79 const std::string& login_captcha); | 79 const std::string& login_captcha); |
| 80 | 80 |
| 81 // Used when a second factor access code was required to complete a signin | 81 // Used when a second factor access code was required to complete a signin |
| 82 // attempt. | 82 // attempt. |
| 83 void ProvideSecondFactorAccessCode(const std::string& access_code); | 83 void ProvideSecondFactorAccessCode(const std::string& access_code); |
| 84 | 84 |
| 85 // Attempt to sign in this user with existing credentials from the cookie jar. | 85 // Attempt to sign in this user with existing credentials from the cookie jar. |
| 86 // Otherwise the result is the same as StartSignIn(). | 86 // |session_index| indicates which user account to use if the cookie jar |
| 87 virtual void StartSignInWithCredentials(const std::string& username, | 87 // contains a multi-login session. Otherwise the end result of this call is |
| 88 // the same as StartSignIn(). |
| 89 virtual void StartSignInWithCredentials(const std::string& session_index, |
| 90 const std::string& username, |
| 88 const std::string& password); | 91 const std::string& password); |
| 89 | 92 |
| 90 // Sign a user out, removing the preference, erasing all keys | 93 // Sign a user out, removing the preference, erasing all keys |
| 91 // associated with the user, and canceling all auth in progress. | 94 // associated with the user, and canceling all auth in progress. |
| 92 virtual void SignOut(); | 95 virtual void SignOut(); |
| 93 | 96 |
| 94 // Returns true if there's a signin in progress. | 97 // Returns true if there's a signin in progress. |
| 95 bool AuthInProgress() const; | 98 bool AuthInProgress() const; |
| 96 | 99 |
| 97 // Handles errors if a required user info key is not returned from the | 100 // Handles errors if a required user info key is not returned from the |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 160 |
| 158 // Register for notifications from the TokenService. | 161 // Register for notifications from the TokenService. |
| 159 content::NotificationRegistrar registrar_; | 162 content::NotificationRegistrar registrar_; |
| 160 | 163 |
| 161 std::string authenticated_username_; | 164 std::string authenticated_username_; |
| 162 | 165 |
| 163 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 166 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
| 164 }; | 167 }; |
| 165 | 168 |
| 166 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ | 169 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ |
| OLD | NEW |