| Index: components/signin/core/browser/account_fetcher_service.cc
|
| diff --git a/components/signin/core/browser/account_fetcher_service.cc b/components/signin/core/browser/account_fetcher_service.cc
|
| index 22c804f6b496723a0a935e75abe82b37765e7d51..a8c4370ed8daa28c7d0a951fd0b067d8fec6ff8d 100644
|
| --- a/components/signin/core/browser/account_fetcher_service.cc
|
| +++ b/components/signin/core/browser/account_fetcher_service.cc
|
| @@ -98,21 +98,6 @@ void AccountFetcherService::Shutdown() {
|
| shutdown_called_ = true;
|
| }
|
|
|
| -void AccountFetcherService::EnableNetworkFetches() {
|
| - DCHECK(CalledOnValidThread());
|
| - DCHECK(!network_fetches_enabled_);
|
| - network_fetches_enabled_ = true;
|
| - // If there are accounts in |pending_user_info_fetches_|, they were deemed
|
| - // invalid after being loaded from prefs and need to be fetched now instead of
|
| - // waiting after the timer.
|
| - for (const std::string& account_id : pending_user_info_fetches_)
|
| - StartFetchingUserInfo(account_id);
|
| - pending_user_info_fetches_.clear();
|
| -
|
| - // Now that network fetches are enabled, schedule the next refresh.
|
| - ScheduleNextRefresh();
|
| -}
|
| -
|
| bool AccountFetcherService::IsAllUserInfoFetched() const {
|
| return user_info_requests_.empty();
|
| }
|
| @@ -180,10 +165,8 @@ void AccountFetcherService::ScheduleNextRefresh() {
|
| void AccountFetcherService::StartFetchingUserInfo(
|
| const std::string& account_id) {
|
| DCHECK(CalledOnValidThread());
|
| - if (!network_fetches_enabled_) {
|
| - pending_user_info_fetches_.push_back(account_id);
|
| + if (!network_fetches_enabled_)
|
| return;
|
| - }
|
|
|
| if (!ContainsKey(user_info_requests_, account_id)) {
|
| DVLOG(1) << "StartFetching " << account_id;
|
| @@ -315,8 +298,11 @@ void AccountFetcherService::OnRefreshTokenRevoked(
|
| }
|
|
|
| void AccountFetcherService::OnRefreshTokensLoaded() {
|
| - // OnRefreshTokenAvailable has been called for all accounts by this point.
|
| - // Maybe remove this after further investigation.
|
| + DCHECK(CalledOnValidThread());
|
| + if (!network_fetches_enabled_) {
|
| + network_fetches_enabled_ = true;
|
| + ScheduleNextRefresh();
|
| + }
|
| RefreshAllAccountInfo(true);
|
| UpdateChildInfo();
|
| }
|
|
|