OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // OAuth2TokenService::Observer implementation. | 68 // OAuth2TokenService::Observer implementation. |
69 virtual void OnRefreshTokenAvailable(const std::string& account_key) OVERRIDE; | 69 virtual void OnRefreshTokenAvailable(const std::string& account_key) OVERRIDE; |
70 virtual void OnRefreshTokenRevoked(const std::string& account_key) OVERRIDE; | 70 virtual void OnRefreshTokenRevoked(const std::string& account_key) OVERRIDE; |
71 | 71 |
72 void OnUserInfoFetchSuccess(AccountIdFetcher* fetcher, | 72 void OnUserInfoFetchSuccess(AccountIdFetcher* fetcher, |
73 const std::string& gaia_id); | 73 const std::string& gaia_id); |
74 void OnUserInfoFetchFailure(AccountIdFetcher* fetcher); | 74 void OnUserInfoFetchFailure(AccountIdFetcher* fetcher); |
75 | 75 |
76 // AuthStatusProvider implementation. | 76 // AuthStatusProvider implementation. |
77 virtual std::string GetAccountId() const OVERRIDE; | 77 virtual std::string GetAccountId() const OVERRIDE; |
| 78 virtual std::string GetUsername() const OVERRIDE; |
78 virtual GoogleServiceAuthError GetAuthStatus() const OVERRIDE; | 79 virtual GoogleServiceAuthError GetAuthStatus() const OVERRIDE; |
79 | 80 |
80 // SigninManagerBase::Observer implementation. | 81 // SigninManagerBase::Observer implementation. |
81 virtual void GoogleSigninSucceeded(const std::string& username, | 82 virtual void GoogleSigninSucceeded(const std::string& username, |
82 const std::string& password) OVERRIDE; | 83 const std::string& password) OVERRIDE; |
83 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; | 84 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; |
84 | 85 |
85 // Sets the state of an account. Does not fire notifications. | 86 // Sets the state of an account. Does not fire notifications. |
86 void SetAccountStateForTest(AccountIds ids, bool is_signed_in); | 87 void SetAccountStateForTest(AccountIds ids, bool is_signed_in); |
87 | 88 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 AccountTracker* tracker_; | 143 AccountTracker* tracker_; |
143 const std::string account_key_; | 144 const std::string account_key_; |
144 | 145 |
145 scoped_ptr<OAuth2TokenService::Request> login_token_request_; | 146 scoped_ptr<OAuth2TokenService::Request> login_token_request_; |
146 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; | 147 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; |
147 }; | 148 }; |
148 | 149 |
149 } // namespace extensions | 150 } // namespace extensions |
150 | 151 |
151 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ | 152 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ |
OLD | NEW |