| 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 957603e0707bf102c6f46a237bb5ec3aadf7eccf..f066d65c86ba709a8dfe60ff516dc6bf72fc5cfb 100644
|
| --- a/chrome/browser/sync/profile_sync_service_factory.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_factory.cc
|
| @@ -103,17 +103,19 @@ ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() {
|
| // static
|
| ProfileSyncService* ProfileSyncServiceFactory::GetForProfile(
|
| Profile* profile) {
|
| - if (!ProfileSyncService::IsSyncAllowedByFlag())
|
| - return nullptr;
|
| -
|
| return static_cast<ProfileSyncService*>(
|
| - GetInstance()->GetServiceForBrowserContext(profile, true));
|
| + GetSyncServiceForBrowserContext(profile));
|
| }
|
|
|
| // static
|
| syncer::SyncService* ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(
|
| content::BrowserContext* context) {
|
| - return GetForProfile(Profile::FromBrowserContext(context));
|
| + if (!ProfileSyncService::IsSyncAllowedByFlag()) {
|
| + return nullptr;
|
| + }
|
| +
|
| + return static_cast<syncer::SyncService*>(
|
| + GetInstance()->GetServiceForBrowserContext(context, true));
|
| }
|
|
|
| ProfileSyncServiceFactory::ProfileSyncServiceFactory()
|
|
|