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 0000819ae3071e545f6a2077013ed42140c1c1c3..79e0888a2640bd206da011252c705605c17b0233 100644 |
--- a/chrome/browser/sync/profile_sync_service_factory.cc |
+++ b/chrome/browser/sync/profile_sync_service_factory.cc |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/password_manager/password_store_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_dependency_manager.h" |
+#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/search_engines/template_url_service_factory.h" |
#include "chrome/browser/sessions/tab_restore_service_factory.h" |
#include "chrome/browser/signin/about_signin_internals_factory.h" |
@@ -38,6 +39,10 @@ ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( |
if (!ProfileSyncService::IsSyncEnabled()) |
return NULL; |
+ // Do not start sync on the import process. |
+ if (ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess())) |
+ return NULL; |
+ |
return static_cast<ProfileSyncService*>( |
GetInstance()->GetServiceForProfile(profile, true)); |
} |