Index: chrome/browser/sync/profile_sync_components_factory_impl.cc |
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
index acdefbaa24fc86cbe8ceaecdcadce613d759b717..611c5a955716fd8d08a7f02136e0b897025a019e 100644 |
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc |
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
@@ -12,6 +12,8 @@ |
#include "chrome/browser/extensions/extension_system_factory.h" |
#include "chrome/browser/history/history.h" |
#include "chrome/browser/history/history_service_factory.h" |
+#include "chrome/browser/notifier/chrome_notifier_service.h" |
+#include "chrome/browser/notifier/chrome_notifier_service_factory.h" |
#include "chrome/browser/prefs/pref_model_associator.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -223,6 +225,15 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
new UIDataTypeController( |
syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); |
} |
+ |
+ // Synced Notifications sync is enabled by default. Register unless |
+ // explicitly disabled. |
+ if (!command_line_->HasSwitch(switches::kDisableSyncSyncedNotifications)) { |
+ pss->RegisterDataTypeController( |
+ new UIDataTypeController( |
+ syncer::SYNCED_NOTIFICATIONS, this, profile_, pss)); |
+ } |
+ |
} |
DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
@@ -297,6 +308,15 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl:: |
profile_, Profile::EXPLICIT_ACCESS); |
return history ? history->AsWeakPtr() : base::WeakPtr<HistoryService>(); |
} |
+ |
+ case syncer::SYNCED_NOTIFICATIONS: { |
+ ChromeNotifierService* notifier = |
+ ChromeNotifierServiceFactory::GetForProfile( |
+ profile_, Profile::EXPLICIT_ACCESS); |
+ return notifier ? notifier->AsWeakPtr() |
+ : base::WeakPtr<ChromeNotifierService>(); |
+ } |
+ |
default: |
// The following datatypes still need to be transitioned to the |
// syncer::SyncableService API: |