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

Unified Diff: components/browser_sync/profile_sync_components_factory_impl.cc

Issue 2869633003: [Sync] Hook UserEvents into sync. (Closed)
Patch Set: Rebase Created 3 years, 7 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_service_factory.cc ('k') | components/sync/driver/sync_driver_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_components_factory_impl.cc
diff --git a/components/browser_sync/profile_sync_components_factory_impl.cc b/components/browser_sync/profile_sync_components_factory_impl.cc
index 445b20bb22190e9c2491a0a43d6632f934df8e7b..2c2f1ab748232201071b0af97ac9e27e86e2045c 100644
--- a/components/browser_sync/profile_sync_components_factory_impl.cc
+++ b/components/browser_sync/profile_sync_components_factory_impl.cc
@@ -49,6 +49,7 @@
#include "google_apis/gaia/oauth2_token_service_request.h"
#include "net/url_request/url_request_context_getter.h"
+using base::FeatureList;
using bookmarks::BookmarkModel;
using sync_bookmarks::BookmarkChangeProcessor;
using sync_bookmarks::BookmarkDataTypeController;
@@ -139,7 +140,7 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
base::Bind(&syncer::ReportUnrecoverableError, channel_);
// TODO(stanisc): can DEVICE_INFO be one of disabled datatypes?
- if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) {
+ if (FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) {
// Use an error callback that always uploads a stacktrace if it can to help
// get USS as stable as possible.
sync_service->RegisterDataTypeController(
@@ -155,7 +156,7 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
// Autocomplete sync is enabled by default. Register unless explicitly
// disabled.
if (!disabled_types.Has(syncer::AUTOFILL)) {
- if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) {
+ if (FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) {
sync_service->RegisterDataTypeController(
base::MakeUnique<autofill::WebDataModelTypeController>(
syncer::AUTOFILL, sync_client_, db_thread_, web_data_service_,
@@ -308,6 +309,13 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
base::MakeUnique<ModelTypeController>(syncer::READING_LIST,
sync_client_, ui_thread_));
}
+
+ if (!disabled_types.Has(syncer::USER_EVENTS) &&
+ FeatureList::IsEnabled(switches::kSyncUserEvents)) {
+ sync_service->RegisterDataTypeController(
+ base::MakeUnique<ModelTypeController>(syncer::USER_EVENTS, sync_client_,
+ ui_thread_));
+ }
}
DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | components/sync/driver/sync_driver_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698