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

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

Issue 11745024: Synced Notification Sync Change Processor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Lint fixes Created 7 years, 11 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
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..7986e3f5729a3f9bbf0d72f8de9c4987015a7e31 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,14 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
new UIDataTypeController(
syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss));
}
+
+ // Synced Notifications sync is enabled by default. Register unless
Nicolas Zea 2013/01/29 01:17:02 I don't think this should be enabled by default. T
Pete Williamson 2013/01/29 02:10:37 Done.
+ // explicitly disabled.
+ if (!command_line_->HasSwitch(switches::kDisableSyncSyncedNotifications)) {
+ pss->RegisterDataTypeController(
+ new UIDataTypeController(
+ syncer::SYNCED_NOTIFICATIONS, this, profile_, pss));
+ }
}
DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
@@ -297,6 +307,15 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
profile_, Profile::EXPLICIT_ACCESS);
return history ? history->AsWeakPtr() : base::WeakPtr<HistoryService>();
}
+
+ case syncer::SYNCED_NOTIFICATIONS: {
+ notifier::ChromeNotifierService* notifier_service =
+ notifier::ChromeNotifierServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
+ return notifier_service ? notifier_service->AsWeakPtr()
+ : base::WeakPtr<notifier::ChromeNotifierService>();
+ }
+
default:
// The following datatypes still need to be transitioned to the
// syncer::SyncableService API:

Powered by Google App Engine
This is Rietveld 408576698