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

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

Issue 12617010: Turn on SyncedNotifications in Dev and Canary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced Notifications enable dev and canary - fix unittests Created 7 years, 9 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 | « no previous file | chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dc447fc72d89a3efbba106010c306f8f35cd1823..ab37a4c967a31956b594d398e60b63cbe60b9930 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -59,6 +59,7 @@
#include "chrome/browser/webdata/autofill_profile_syncable_service.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "sync/api/syncable_service.h"
@@ -240,12 +241,15 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
// Synced Notifications sync is disabled by default.
// TODO(petewil): Switch to enabled by default once datatype support is done.
- if (command_line_->HasSwitch(switches::kEnableSyncSyncedNotifications)) {
-#if !defined(OS_ANDROID)
- pss->RegisterDataTypeController(
- new UIDataTypeController(
- syncer::SYNCED_NOTIFICATIONS, this, profile_, pss));
-#endif
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+ if (!command_line_->HasSwitch(switches::kDisableSyncSyncedNotifications)) {
+ if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN ||
+ channel == chrome::VersionInfo::CHANNEL_CANARY ||
+ channel == chrome::VersionInfo::CHANNEL_DEV) {
+ pss->RegisterDataTypeController(
+ new UIDataTypeController(
+ syncer::SYNCED_NOTIFICATIONS, this, profile_, pss));
+ }
}
#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698