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.h" | 10 #include "chrome/browser/history/history_service.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" | 40 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" |
41 #include "chrome/browser/sync/glue/typed_url_model_associator.h" | 41 #include "chrome/browser/sync/glue/typed_url_model_associator.h" |
42 #include "chrome/browser/sync/glue/ui_data_type_controller.h" | 42 #include "chrome/browser/sync/glue/ui_data_type_controller.h" |
43 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" | 43 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" |
44 #include "chrome/browser/sync/profile_sync_service.h" | 44 #include "chrome/browser/sync/profile_sync_service.h" |
45 #include "chrome/browser/sync/profile_sync_service_factory.h" | 45 #include "chrome/browser/sync/profile_sync_service_factory.h" |
46 #include "chrome/browser/sync/sessions2/session_data_type_controller2.h" | 46 #include "chrome/browser/sync/sessions2/session_data_type_controller2.h" |
47 #include "chrome/browser/themes/theme_service.h" | 47 #include "chrome/browser/themes/theme_service.h" |
48 #include "chrome/browser/themes/theme_service_factory.h" | 48 #include "chrome/browser/themes/theme_service_factory.h" |
49 #include "chrome/browser/themes/theme_syncable_service.h" | 49 #include "chrome/browser/themes/theme_syncable_service.h" |
50 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | |
51 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | |
52 #include "chrome/browser/webdata/autocomplete_syncable_service.h" | 50 #include "chrome/browser/webdata/autocomplete_syncable_service.h" |
53 #include "chrome/browser/webdata/web_data_service_factory.h" | 51 #include "chrome/browser/webdata/web_data_service_factory.h" |
54 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
55 #include "chrome/common/chrome_version_info.h" | 53 #include "chrome/common/chrome_version_info.h" |
56 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
57 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" | 55 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" |
58 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 56 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
59 #include "components/dom_distiller/core/dom_distiller_service.h" | 57 #include "components/dom_distiller/core/dom_distiller_service.h" |
60 #include "components/password_manager/core/browser/password_store.h" | 58 #include "components/password_manager/core/browser/password_store.h" |
61 #include "components/signin/core/browser/signin_manager.h" | 59 #include "components/signin/core/browser/signin_manager.h" |
62 #include "components/sync_driver/data_type_manager_observer.h" | 60 #include "components/sync_driver/data_type_manager_observer.h" |
63 #include "components/sync_driver/proxy_data_type_controller.h" | 61 #include "components/sync_driver/proxy_data_type_controller.h" |
64 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
65 #include "extensions/browser/extension_system.h" | 63 #include "extensions/browser/extension_system.h" |
66 #include "sync/api/attachments/attachment_service.h" | 64 #include "sync/api/attachments/attachment_service.h" |
67 #include "sync/api/attachments/fake_attachment_service.h" | 65 #include "sync/api/attachments/fake_attachment_service.h" |
68 #include "sync/api/attachments/fake_attachment_store.h" | 66 #include "sync/api/attachments/fake_attachment_store.h" |
69 #include "sync/api/syncable_service.h" | 67 #include "sync/api/syncable_service.h" |
70 | 68 |
71 #if defined(ENABLE_EXTENSIONS) | 69 #if defined(ENABLE_EXTENSIONS) |
72 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" | 70 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" |
73 #include "chrome/browser/extensions/extension_sync_service.h" | 71 #include "chrome/browser/extensions/extension_sync_service.h" |
74 #endif | 72 #endif |
75 | 73 |
| 74 #if defined(ENABLE_APP_LIST) |
| 75 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 76 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 77 #include "ui/app_list/app_list_switches.h" |
| 78 #endif |
| 79 |
76 #if defined(ENABLE_MANAGED_USERS) | 80 #if defined(ENABLE_MANAGED_USERS) |
77 #include "chrome/browser/managed_mode/managed_user_settings_service.h" | 81 #include "chrome/browser/managed_mode/managed_user_settings_service.h" |
78 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" | 82 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" |
79 #include "chrome/browser/managed_mode/managed_user_shared_settings_service.h" | 83 #include "chrome/browser/managed_mode/managed_user_shared_settings_service.h" |
80 #include "chrome/browser/managed_mode/managed_user_shared_settings_service_facto
ry.h" | 84 #include "chrome/browser/managed_mode/managed_user_shared_settings_service_facto
ry.h" |
81 #include "chrome/browser/managed_mode/managed_user_sync_service.h" | 85 #include "chrome/browser/managed_mode/managed_user_sync_service.h" |
82 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" | 86 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" |
83 #endif | 87 #endif |
84 | 88 |
85 #if !defined(OS_ANDROID) | 89 #if !defined(OS_ANDROID) |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 358 |
355 // App setting sync is enabled by default. Register unless explicitly | 359 // App setting sync is enabled by default. Register unless explicitly |
356 // disabled. | 360 // disabled. |
357 if (!disabled_types.Has(syncer::APP_SETTINGS)) { | 361 if (!disabled_types.Has(syncer::APP_SETTINGS)) { |
358 pss->RegisterDataTypeController( | 362 pss->RegisterDataTypeController( |
359 new ExtensionSettingDataTypeController( | 363 new ExtensionSettingDataTypeController( |
360 syncer::APP_SETTINGS, this, profile_, pss)); | 364 syncer::APP_SETTINGS, this, profile_, pss)); |
361 } | 365 } |
362 | 366 |
363 #if defined(ENABLE_APP_LIST) | 367 #if defined(ENABLE_APP_LIST) |
364 if (!command_line_->HasSwitch(switches::kDisableSyncAppList)) { | 368 if (app_list::switches::IsAppListSyncEnabled()) { |
365 pss->RegisterDataTypeController( | 369 pss->RegisterDataTypeController( |
366 new UIDataTypeController( | 370 new UIDataTypeController( |
367 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 371 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
368 base::Bind(&ChromeReportUnrecoverableError), | 372 base::Bind(&ChromeReportUnrecoverableError), |
369 syncer::APP_LIST, | 373 syncer::APP_LIST, |
370 this, | 374 this, |
371 profile_, | 375 profile_, |
372 pss)); | 376 pss)); |
373 } | 377 } |
374 #endif | 378 #endif |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 ProfileSyncComponentsFactory::SyncComponents | 641 ProfileSyncComponentsFactory::SyncComponents |
638 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 642 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
639 ProfileSyncService* profile_sync_service, | 643 ProfileSyncService* profile_sync_service, |
640 DataTypeErrorHandler* error_handler) { | 644 DataTypeErrorHandler* error_handler) { |
641 SessionModelAssociator* model_associator = | 645 SessionModelAssociator* model_associator = |
642 new SessionModelAssociator(profile_sync_service, error_handler); | 646 new SessionModelAssociator(profile_sync_service, error_handler); |
643 SessionChangeProcessor* change_processor = | 647 SessionChangeProcessor* change_processor = |
644 new SessionChangeProcessor(error_handler, model_associator); | 648 new SessionChangeProcessor(error_handler, model_associator); |
645 return SyncComponents(model_associator, change_processor); | 649 return SyncComponents(model_associator, change_processor); |
646 } | 650 } |
OLD | NEW |