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( |