Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2963)

Unified Diff: chrome/browser/signin/account_fetcher_service_factory.cc

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix iOs Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/account_fetcher_service_factory.cc
diff --git a/chrome/browser/signin/account_fetcher_service_factory.cc b/chrome/browser/signin/account_fetcher_service_factory.cc
index c6911aeedfca77682408d45aeecb9763947e3b31..4390f63a1fe174ffd32eac94ebed9d85a2f36c5e 100644
--- a/chrome/browser/signin/account_fetcher_service_factory.cc
+++ b/chrome/browser/signin/account_fetcher_service_factory.cc
@@ -4,13 +4,10 @@
#include "chrome/browser/signin/account_fetcher_service_factory.h"
-#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "components/invalidation/impl/profile_invalidation_provider.h"
-#include "components/invalidation/public/invalidation_service.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/signin/core/browser/account_fetcher_service.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
@@ -22,7 +19,6 @@ AccountFetcherServiceFactory::AccountFetcherServiceFactory()
DependsOn(AccountTrackerServiceFactory::GetInstance());
DependsOn(ChromeSigninClientFactory::GetInstance());
DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
- DependsOn(invalidation::ProfileInvalidationProviderFactory::GetInstance());
}
AccountFetcherServiceFactory::~AccountFetcherServiceFactory() {}
@@ -48,16 +44,10 @@ KeyedService* AccountFetcherServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = Profile::FromBrowserContext(context);
AccountFetcherService* service = new AccountFetcherService();
- invalidation::ProfileInvalidationProvider* invalidation_provider =
- invalidation::ProfileInvalidationProviderFactory::GetForProfile(profile);
- // Chrome OS login and guest profiles do not support invalidation. This is
- // fine as they do not have GAIA credentials anyway. http://crbug.com/358169
- invalidation::InvalidationService* invalidation_service =
- invalidation_provider ? invalidation_provider->GetInvalidationService()
- : nullptr;
service->Initialize(ChromeSigninClientFactory::GetForProfile(profile),
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
- AccountTrackerServiceFactory::GetForProfile(profile),
- invalidation_service);
+ AccountTrackerServiceFactory::GetForProfile(profile));
+ if (profile->AsTestingProfile() != nullptr)
+ service->DisableScheduledRefreshForTesting();
return service;
}
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/signin/fake_account_fetcher_service_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698