Chromium Code Reviews| 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 33bb0c675422cbe253b57b8b7264dde3887cb84c..06931f65afb4f2b503077dfcc55a39859dbf6a3c 100644 |
| --- a/chrome/browser/sync/profile_sync_service_factory.cc |
| +++ b/chrome/browser/sync/profile_sync_service_factory.cc |
| @@ -32,6 +32,7 @@ |
| #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| #include "components/signin/core/browser/signin_manager.h" |
| +#include "components/variations/variations_associated_data.h" |
| #include "url/gurl.h" |
| #if defined(ENABLE_EXTENSIONS) |
| @@ -50,6 +51,13 @@ ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( |
| if (!ProfileSyncService::IsSyncEnabled()) |
| return NULL; |
| + // Disable sync experimentally to measure impact on startup time. Supervised |
| + // users are unaffected, since supervised users rely completely on sync. |
| + // TODO(mlerman): Remove this after the experiment. crbug.com/454788 |
| + if (!profile->IsSupervised() && |
| + !variations::GetVariationParamValue("LightSpeed", "DisableSync").empty()) |
|
Nicolas Zea
2015/02/20 18:23:26
nit: curly braces
Mike Lerman
2015/02/20 18:28:50
Done. The line wrapping's a bit ugly so I let git
|
| + return NULL; |
| + |
| return static_cast<ProfileSyncService*>( |
| GetInstance()->GetServiceForBrowserContext(profile, true)); |
| } |