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

Side by Side Diff: chrome/browser/sync/profile_sync_factory_impl.cc

Issue 8585006: Turn app notifications sync to be on by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/extensions/app_notification_manager.h" 6 #include "chrome/browser/extensions/app_notification_manager.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/settings/settings_backend.h" 8 #include "chrome/browser/extensions/settings/settings_backend.h"
9 #include "chrome/browser/prefs/pref_model_associator.h" 9 #include "chrome/browser/prefs/pref_model_associator.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 pss->RegisterDataTypeController( 176 pss->RegisterDataTypeController(
177 new ExtensionSettingDataTypeController( 177 new ExtensionSettingDataTypeController(
178 syncable::APP_SETTINGS, this, profile_, pss)); 178 syncable::APP_SETTINGS, this, profile_, pss));
179 } 179 }
180 180
181 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) { 181 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) {
182 pss->RegisterDataTypeController( 182 pss->RegisterDataTypeController(
183 new AutofillProfileDataTypeController(this, profile_)); 183 new AutofillProfileDataTypeController(this, profile_));
184 } 184 }
185 185
186 // App notifications sync is disabled by default. Register only if 186 // App notifications sync is enabled by default. Register only if
187 // explicitly enabled. 187 // explicitly disabled.
188 if (command_line_->HasSwitch(switches::kEnableSyncAppNotifications)) { 188 if (!command_line_->HasSwitch(switches::kDisableSyncAppNotifications)) {
189 pss->RegisterDataTypeController( 189 pss->RegisterDataTypeController(
190 new AppNotificationDataTypeController(this, profile_, pss)); 190 new AppNotificationDataTypeController(this, profile_, pss));
191 } 191 }
192 } 192 }
193 193
194 DataTypeManager* ProfileSyncFactoryImpl::CreateDataTypeManager( 194 DataTypeManager* ProfileSyncFactoryImpl::CreateDataTypeManager(
195 SyncBackendHost* backend, 195 SyncBackendHost* backend,
196 const DataTypeController::TypeMap* controllers) { 196 const DataTypeController::TypeMap* controllers) {
197 return new DataTypeManagerImpl(backend, controllers); 197 return new DataTypeManagerImpl(backend, controllers);
198 } 198 }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 GenericChangeProcessor* change_processor = 398 GenericChangeProcessor* change_processor =
399 new GenericChangeProcessor(error_handler, 399 new GenericChangeProcessor(error_handler,
400 notif_sync_service, 400 notif_sync_service,
401 user_share); 401 user_share);
402 SyncableServiceAdapter* sync_service_adapter = 402 SyncableServiceAdapter* sync_service_adapter =
403 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS, 403 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS,
404 notif_sync_service, 404 notif_sync_service,
405 change_processor); 405 change_processor);
406 return SyncComponents(sync_service_adapter, change_processor); 406 return SyncComponents(sync_service_adapter, change_processor);
407 } 407 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/sync/profile_sync_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698