| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // account id is not present, GetAccountInfoOfRefreshToken will be called to | 183 // account id is not present, GetAccountInfoOfRefreshToken will be called to |
| 184 // retrieve the associated account info. | 184 // retrieve the associated account info. |
| 185 void StoreOAuth2Token(); | 185 void StoreOAuth2Token(); |
| 186 | 186 |
| 187 // Get the account info corresponding to the specified refresh token. | 187 // Get the account info corresponding to the specified refresh token. |
| 188 void GetAccountInfoOfRefreshToken(const std::string& refresh_token); | 188 void GetAccountInfoOfRefreshToken(const std::string& refresh_token); |
| 189 | 189 |
| 190 // Update the token service and inform listeners of a new refresh token. | 190 // Update the token service and inform listeners of a new refresh token. |
| 191 void UpdateCredentials(const std::string& account_id); | 191 void UpdateCredentials(const std::string& account_id); |
| 192 | 192 |
| 193 // Notify that the refresh tokens are loaded and ready to use. |
| 194 void FireRefreshTokensLoaded(); |
| 195 |
| 193 // Attempts to fetch OAuth2 tokens by using pre-authenticated cookie jar from | 196 // Attempts to fetch OAuth2 tokens by using pre-authenticated cookie jar from |
| 194 // provided |auth_profile|. | 197 // provided |auth_profile|. |
| 195 void FetchOAuth2Tokens(); | 198 void FetchOAuth2Tokens(); |
| 196 | 199 |
| 197 // Reports when all tokens are loaded. | 200 // Reports when all tokens are loaded. |
| 198 void ReportOAuth2TokensLoaded(); | 201 void ReportOAuth2TokensLoaded(); |
| 199 | 202 |
| 200 // Checks if primary account sessions cookies are stale and restores them | 203 // Checks if primary account sessions cookies are stale and restores them |
| 201 // if needed. | 204 // if needed. |
| 202 void VerifySessionCookies(); | 205 void VerifySessionCookies(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // TODO(zelidrag|gspencer): Figure out how to get rid of ProfileHelper so we | 252 // TODO(zelidrag|gspencer): Figure out how to get rid of ProfileHelper so we |
| 250 // can change the line below to base::ObserverList<Observer, true>. | 253 // can change the line below to base::ObserverList<Observer, true>. |
| 251 base::ObserverList<Observer, false> observer_list_; | 254 base::ObserverList<Observer, false> observer_list_; |
| 252 | 255 |
| 253 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); | 256 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); |
| 254 }; | 257 }; |
| 255 | 258 |
| 256 } // namespace chromeos | 259 } // namespace chromeos |
| 257 | 260 |
| 258 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ | 261 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_OAUTH2_LOGIN_MANAGER_H_ |
| OLD | NEW |