| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 private: | 90 private: |
| 91 struct AccountState { | 91 struct AccountState { |
| 92 AccountIds ids; | 92 AccountIds ids; |
| 93 bool is_signed_in; | 93 bool is_signed_in; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 void NotifyAccountAdded(const AccountState& account); | 96 void NotifyAccountAdded(const AccountState& account); |
| 97 void NotifyAccountRemoved(const AccountState& account); | 97 void NotifyAccountRemoved(const AccountState& account); |
| 98 void NotifySignInChanged(const AccountState& account); | 98 void NotifySignInChanged(const AccountState& account); |
| 99 | 99 |
| 100 void UpdateSignInState(const std::string account_key, bool is_signed_in); | 100 void UpdateSignInState(const std::string& account_key, bool is_signed_in); |
| 101 | 101 |
| 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 base::ObserverList<Observer> observer_list_; | 112 base::ObserverList<Observer> observer_list_; |
| 113 bool shutdown_called_; | 113 bool shutdown_called_; |
| 114 }; | 114 }; |
| 115 | 115 |
| (...skipping 28 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 |