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

Unified Diff: chrome/browser/sync/profile_sync_service_factory.cc

Issue 162443004: sync: final pieces to sync deferred initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 6 years, 10 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 | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_factory.cc
diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc
index 6e2f86948b7240654a83e8b7d62e5d1cbf1e18a3..e8b885260300a043b2395e9725597a3705fdb859 100644
--- a/chrome/browser/sync/profile_sync_service_factory.cc
+++ b/chrome/browser/sync/profile_sync_service_factory.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/profile_sync_components_factory_impl.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/startup_controller.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
@@ -89,10 +90,6 @@ BrowserContextKeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- ProfileSyncService::StartBehavior behavior =
- browser_defaults::kSyncAutoStarts ? ProfileSyncService::AUTO_START
- : ProfileSyncService::MANUAL_START;
-
SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
// Automatically load the GCMProfileService if the enabled state has been
@@ -116,6 +113,9 @@ BrowserContextKeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor(
// intervention). We can get rid of the browser_default eventually, but
// need to take care that ProfileSyncService doesn't get tripped up between
// those two cases. Bug 88109.
+ browser_sync::ProfileSyncServiceStartBehavior behavior =
+ browser_defaults::kSyncAutoStarts ? browser_sync::AUTO_START
+ : browser_sync::MANUAL_START;
ProfileSyncService* pss = new ProfileSyncService(
new ProfileSyncComponentsFactoryImpl(profile,
CommandLine::ForCurrentProcess()),
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698