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

Unified Diff: chrome/browser/profiles/profile_manager.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
« no previous file with comments | « no previous file | chrome/browser/signin/account_fetcher_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index b06c2afbd514b1554d093364265bb6167e1c9c21..a7a76aa96529defcf2da01b07ac689be39f2d219 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
+#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
#include "chrome/browser/password_manager/password_manager_setting_migrator_service.h"
@@ -62,6 +63,8 @@
#include "components/bookmarks/browser/startup_task_runner_service.h"
#include "components/bookmarks/common/bookmark_pref_names.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "components/invalidation/impl/profile_invalidation_provider.h"
+#include "components/invalidation/public/invalidation_service.h"
#include "components/password_manager/core/browser/password_store.h"
#include "components/signin/core/browser/account_fetcher_service.h"
#include "components/signin/core/browser/account_tracker_service.h"
@@ -1115,7 +1118,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
MaybeActivateDataReductionProxy(true);
GaiaCookieManagerServiceFactory::GetForProfile(profile)->Init();
- AccountFetcherServiceFactory::GetForProfile(profile)->EnableNetworkFetches();
+ 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;
+ AccountFetcherServiceFactory::GetForProfile(profile)
+ ->SetupInvalidations(invalidation_service);
AccountReconcilorFactory::GetForProfile(profile);
// Service is responsible for migration of the legacy password manager
« no previous file with comments | « no previous file | chrome/browser/signin/account_fetcher_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698