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

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

Issue 933293005: Disable sync for Lightspeed experimentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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_components_factory_impl.cc ('k') | no next file » | 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 33bb0c675422cbe253b57b8b7264dde3887cb84c..212d07856332eb1fb494d28b811b6c73f01abd33 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,15 @@ 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()) {
+ return NULL;
+ }
+
return static_cast<ProfileSyncService*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
« no previous file with comments | « chrome/browser/sync/profile_sync_components_factory_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698