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

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: Sync doesn't disable for supervised users 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..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));
}
« 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