OLD | NEW |
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/bookmarks/enhanced_bookmarks_features.h" | 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 this)); | 307 this)); |
308 } | 308 } |
309 | 309 |
310 // Password sync is enabled by default. Register unless explicitly | 310 // Password sync is enabled by default. Register unless explicitly |
311 // disabled. | 311 // disabled. |
312 if (!disabled_types.Has(syncer::PASSWORDS)) { | 312 if (!disabled_types.Has(syncer::PASSWORDS)) { |
313 pss->RegisterDataTypeController( | 313 pss->RegisterDataTypeController( |
314 new PasswordDataTypeController(this, profile_)); | 314 new PasswordDataTypeController(this, profile_)); |
315 } | 315 } |
316 | 316 |
| 317 if (!disabled_types.Has(syncer::PRIORITY_PREFERENCES)) { |
| 318 pss->RegisterDataTypeController( |
| 319 new UIDataTypeController( |
| 320 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 321 base::Bind(&ChromeReportUnrecoverableError), |
| 322 syncer::PRIORITY_PREFERENCES, |
| 323 this)); |
| 324 } |
| 325 |
317 // Article sync is disabled by default. Register only if explicitly enabled. | 326 // Article sync is disabled by default. Register only if explicitly enabled. |
318 if (IsEnableSyncArticlesSet()) { | 327 if (IsEnableSyncArticlesSet()) { |
319 pss->RegisterDataTypeController( | 328 pss->RegisterDataTypeController( |
320 new UIDataTypeController( | 329 new UIDataTypeController( |
321 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 330 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
322 base::Bind(&ChromeReportUnrecoverableError), | 331 base::Bind(&ChromeReportUnrecoverableError), |
323 syncer::ARTICLES, | 332 syncer::ARTICLES, |
324 this)); | 333 this)); |
325 } | 334 } |
326 | 335 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // disabled. | 371 // disabled. |
363 if (!disabled_types.Has(syncer::PREFERENCES)) { | 372 if (!disabled_types.Has(syncer::PREFERENCES)) { |
364 pss->RegisterDataTypeController( | 373 pss->RegisterDataTypeController( |
365 new UIDataTypeController( | 374 new UIDataTypeController( |
366 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 375 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
367 base::Bind(&ChromeReportUnrecoverableError), | 376 base::Bind(&ChromeReportUnrecoverableError), |
368 syncer::PREFERENCES, | 377 syncer::PREFERENCES, |
369 this)); | 378 this)); |
370 } | 379 } |
371 | 380 |
372 if (!disabled_types.Has(syncer::PRIORITY_PREFERENCES)) { | |
373 pss->RegisterDataTypeController( | |
374 new UIDataTypeController( | |
375 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | |
376 base::Bind(&ChromeReportUnrecoverableError), | |
377 syncer::PRIORITY_PREFERENCES, | |
378 this)); | |
379 } | |
380 | |
381 #if defined(ENABLE_THEMES) | 381 #if defined(ENABLE_THEMES) |
382 // Theme sync is enabled by default. Register unless explicitly disabled. | 382 // Theme sync is enabled by default. Register unless explicitly disabled. |
383 if (!disabled_types.Has(syncer::THEMES)) { | 383 if (!disabled_types.Has(syncer::THEMES)) { |
384 pss->RegisterDataTypeController( | 384 pss->RegisterDataTypeController( |
385 new ThemeDataTypeController(this, profile_)); | 385 new ThemeDataTypeController(this, profile_)); |
386 } | 386 } |
387 #endif | 387 #endif |
388 | 388 |
389 // Search Engine sync is enabled by default. Register unless explicitly | 389 // Search Engine sync is enabled by default. Register unless explicitly |
390 // disabled. | 390 // disabled. |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 new TypedUrlModelAssociator(profile_sync_service, | 739 new TypedUrlModelAssociator(profile_sync_service, |
740 history_backend, | 740 history_backend, |
741 error_handler); | 741 error_handler); |
742 TypedUrlChangeProcessor* change_processor = | 742 TypedUrlChangeProcessor* change_processor = |
743 new TypedUrlChangeProcessor(profile_, | 743 new TypedUrlChangeProcessor(profile_, |
744 model_associator, | 744 model_associator, |
745 history_backend, | 745 history_backend, |
746 error_handler); | 746 error_handler); |
747 return SyncComponents(model_associator, change_processor); | 747 return SyncComponents(model_associator, change_processor); |
748 } | 748 } |
OLD | NEW |