Chromium Code Reviews| Index: components/signin/core/browser/account_fetcher_service.h |
| diff --git a/components/signin/core/browser/account_fetcher_service.h b/components/signin/core/browser/account_fetcher_service.h |
| index f0d6386afaf4f8b0384cb912ec8ba8669e919464..c0cda69f8a7c40527c020d84d4dcf07bc30ff5d4 100644 |
| --- a/components/signin/core/browser/account_fetcher_service.h |
| +++ b/components/signin/core/browser/account_fetcher_service.h |
| @@ -5,8 +5,8 @@ |
| #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ |
| #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ |
| -#include <list> |
| #include <map> |
|
Roger Tawa OOO till Jul 10th
2015/10/13 12:40:56
Doesn't look like we need map anymore.
knn
2015/10/13 13:15:41
Will remove.
|
| +#include <set> |
| #include "base/containers/scoped_ptr_hash_map.h" |
| #include "base/threading/non_thread_safe.h" |
| @@ -68,6 +68,11 @@ class AccountFetcherService : public KeyedService, |
| // Called by ChildAccountInfoFetcher. |
| void SetIsChildAccount(const std::string& account_id, bool is_child_account); |
| +#if defined(OS_ANDROID) |
| + // Called by AccountTrackerServiceAndroid. |
| + void OnAccountIdNameMapSeeded(); |
| +#endif |
| + |
| private: |
| friend class AccountInfoFetcher; |
| friend class ChildAccountInfoFetcherImpl; |
| @@ -86,6 +91,11 @@ class AccountFetcherService : public KeyedService, |
| virtual void StartFetchingUserInfo(const std::string& account_id); |
| virtual void StartFetchingChildInfo(const std::string& account_id); |
| + // Helper methods to defer fetching until it is enabled and any partial |
| + // seeding has been done if it is required (Android). |
| + bool CanFetchAccountInfo(const std::string& account_id); |
| + void FetchPendingAccountInfo(); |
| + |
| // If there is more than one account in a profile, we forcibly reset the |
| // child status for an account to be false. |
| void ResetChildInfo(); |
| @@ -113,7 +123,7 @@ class AccountFetcherService : public KeyedService, |
| SigninClient* signin_client_; // Not owned. |
| invalidation::InvalidationService* invalidation_service_; // Not owned. |
| bool network_fetches_enabled_; |
| - std::list<std::string> pending_user_info_fetches_; |
| + std::set<std::string> pending_user_info_fetches_; |
| base::Time last_updated_; |
| base::OneShotTimer timer_; |
| bool shutdown_called_; |