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 GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ | 5 #ifndef GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ |
6 #define GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ | 6 #define GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void StartTrackingAccount(const std::string account_key); | 102 void StartTrackingAccount(const std::string account_key); |
103 void StopTrackingAccount(const std::string account_key); | 103 void StopTrackingAccount(const std::string account_key); |
104 void StopTrackingAllAccounts(); | 104 void StopTrackingAllAccounts(); |
105 void StartFetchingUserInfo(const std::string account_key); | 105 void StartFetchingUserInfo(const std::string account_key); |
106 void DeleteFetcher(AccountIdFetcher* fetcher); | 106 void DeleteFetcher(AccountIdFetcher* fetcher); |
107 | 107 |
108 IdentityProvider* identity_provider_; // Not owned. | 108 IdentityProvider* identity_provider_; // Not owned. |
109 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 109 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
110 std::map<std::string, AccountIdFetcher*> user_info_requests_; | 110 std::map<std::string, AccountIdFetcher*> user_info_requests_; |
111 std::map<std::string, AccountState> accounts_; | 111 std::map<std::string, AccountState> accounts_; |
112 ObserverList<Observer> observer_list_; | 112 base::ObserverList<Observer> observer_list_; |
113 bool shutdown_called_; | 113 bool shutdown_called_; |
114 }; | 114 }; |
115 | 115 |
116 class AccountIdFetcher : public OAuth2TokenService::Consumer, | 116 class AccountIdFetcher : public OAuth2TokenService::Consumer, |
117 public gaia::GaiaOAuthClient::Delegate { | 117 public gaia::GaiaOAuthClient::Delegate { |
118 public: | 118 public: |
119 AccountIdFetcher(OAuth2TokenService* token_service, | 119 AccountIdFetcher(OAuth2TokenService* token_service, |
120 net::URLRequestContextGetter* request_context_getter, | 120 net::URLRequestContextGetter* request_context_getter, |
121 AccountTracker* tracker, | 121 AccountTracker* tracker, |
122 const std::string& account_key); | 122 const std::string& account_key); |
(...skipping 21 matching lines...) Expand all Loading... |
144 AccountTracker* tracker_; | 144 AccountTracker* tracker_; |
145 const std::string account_key_; | 145 const std::string account_key_; |
146 | 146 |
147 scoped_ptr<OAuth2TokenService::Request> login_token_request_; | 147 scoped_ptr<OAuth2TokenService::Request> login_token_request_; |
148 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; | 148 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; |
149 }; | 149 }; |
150 | 150 |
151 } // namespace extensions | 151 } // namespace extensions |
152 | 152 |
153 #endif // GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ | 153 #endif // GOOGLE_APIS_GAIA_ACCOUNT_TRACKER_H_ |
OLD | NEW |