OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |