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

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

Issue 12096116: Enable dictionary sync by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h"
9 #include "chrome/browser/extensions/app_notification_manager.h" 9 #include "chrome/browser/extensions/app_notification_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Unless it is explicitly disabled, history delete directive sync is 230 // Unless it is explicitly disabled, history delete directive sync is
231 // enabled whenever full history sync is enabled. 231 // enabled whenever full history sync is enabled.
232 if (command_line_->HasSwitch(switches::kHistoryEnableFullHistorySync) && 232 if (command_line_->HasSwitch(switches::kHistoryEnableFullHistorySync) &&
233 !command_line_->HasSwitch( 233 !command_line_->HasSwitch(
234 switches::kDisableSyncHistoryDeleteDirectives)) { 234 switches::kDisableSyncHistoryDeleteDirectives)) {
235 pss->RegisterDataTypeController( 235 pss->RegisterDataTypeController(
236 new UIDataTypeController( 236 new UIDataTypeController(
237 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss)); 237 syncer::HISTORY_DELETE_DIRECTIVES, this, profile_, pss));
238 } 238 }
239 239
240 // Dictionary sync is disabled by default. Register only if explicitly 240 #if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS)
241 // enabled. 241 // Dictionary sync is enabled by default.
242 if (command_line_->HasSwitch(switches::kEnableSyncDictionary)) { 242 if (!command_line_->HasSwitch(switches::kDisableSyncDictionary)) {
243 pss->RegisterDataTypeController( 243 pss->RegisterDataTypeController(
244 new UIDataTypeController(syncer::DICTIONARY, this, profile_, pss)); 244 new UIDataTypeController(syncer::DICTIONARY, this, profile_, pss));
245 } 245 }
246 #endif
246 } 247 }
247 248
248 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( 249 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
249 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 250 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
250 debug_info_listener, 251 debug_info_listener,
251 SyncBackendHost* backend, 252 SyncBackendHost* backend,
252 const DataTypeController::TypeMap* controllers, 253 const DataTypeController::TypeMap* controllers,
253 DataTypeManagerObserver* observer, 254 DataTypeManagerObserver* observer,
254 const FailedDatatypesHandler* failed_datatypes_handler) { 255 const FailedDatatypesHandler* failed_datatypes_handler) {
255 return new DataTypeManagerImpl(debug_info_listener, 256 return new DataTypeManagerImpl(debug_info_listener,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 ProfileSyncComponentsFactory::SyncComponents 395 ProfileSyncComponentsFactory::SyncComponents
395 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 396 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
396 ProfileSyncService* profile_sync_service, 397 ProfileSyncService* profile_sync_service,
397 DataTypeErrorHandler* error_handler) { 398 DataTypeErrorHandler* error_handler) {
398 SessionModelAssociator* model_associator = 399 SessionModelAssociator* model_associator =
399 new SessionModelAssociator(profile_sync_service, error_handler); 400 new SessionModelAssociator(profile_sync_service, error_handler);
400 SessionChangeProcessor* change_processor = 401 SessionChangeProcessor* change_processor =
401 new SessionChangeProcessor(error_handler, model_associator); 402 new SessionChangeProcessor(error_handler, model_associator);
402 return SyncComponents(model_associator, change_processor); 403 return SyncComponents(model_associator, change_processor);
403 } 404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698