| 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 "chrome/browser/extensions/app_notification_manager.h" | 7 #include "chrome/browser/extensions/app_notification_manager.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/settings/settings_frontend.h" | 9 #include "chrome/browser/extensions/settings/settings_frontend.h" |
| 9 #include "chrome/browser/prefs/pref_model_associator.h" | 10 #include "chrome/browser/prefs/pref_model_associator.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/search_engines/template_url_service.h" | 12 #include "chrome/browser/search_engines/template_url_service.h" |
| 12 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 13 #include "chrome/browser/signin/signin_manager.h" | 14 #include "chrome/browser/signin/signin_manager.h" |
| 14 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
| 15 #include "chrome/browser/sync/api/syncable_service.h" | 16 #include "chrome/browser/sync/api/syncable_service.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 return web_data_service->GetAutocompleteSyncableService()->AsWeakPtr(); | 262 return web_data_service->GetAutocompleteSyncableService()->AsWeakPtr(); |
| 262 } | 263 } |
| 263 | 264 |
| 264 ProfileSyncComponentsFactory::SyncComponents | 265 ProfileSyncComponentsFactory::SyncComponents |
| 265 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( | 266 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( |
| 266 ProfileSyncService* profile_sync_service, | 267 ProfileSyncService* profile_sync_service, |
| 267 DataTypeErrorHandler* error_handler) { | 268 DataTypeErrorHandler* error_handler) { |
| 268 BookmarkModel* bookmark_model = | 269 BookmarkModel* bookmark_model = |
| 269 profile_sync_service->profile()->GetBookmarkModel(); | 270 profile_sync_service->profile()->GetBookmarkModel(); |
| 270 sync_api::UserShare* user_share = profile_sync_service->GetUserShare(); | 271 sync_api::UserShare* user_share = profile_sync_service->GetUserShare(); |
| 272 // TODO(akalin): We may want to propagate this switch up eventually. |
| 273 #if defined(OS_ANDROID) |
| 274 const bool kExpectMobileBookmarksFolder = true; |
| 275 #else |
| 276 const bool kExpectMobileBookmarksFolder = false; |
| 277 #endif |
| 271 BookmarkModelAssociator* model_associator = | 278 BookmarkModelAssociator* model_associator = |
| 272 new BookmarkModelAssociator(bookmark_model, | 279 new BookmarkModelAssociator(bookmark_model, |
| 273 user_share, | 280 user_share, |
| 274 error_handler); | 281 error_handler, |
| 282 kExpectMobileBookmarksFolder); |
| 275 BookmarkChangeProcessor* change_processor = | 283 BookmarkChangeProcessor* change_processor = |
| 276 new BookmarkChangeProcessor(model_associator, | 284 new BookmarkChangeProcessor(model_associator, |
| 277 error_handler); | 285 error_handler); |
| 278 return SyncComponents(model_associator, change_processor); | 286 return SyncComponents(model_associator, change_processor); |
| 279 } | 287 } |
| 280 | 288 |
| 281 ProfileSyncComponentsFactory::SyncComponents | 289 ProfileSyncComponentsFactory::SyncComponents |
| 282 ProfileSyncComponentsFactoryImpl::CreateExtensionOrAppSettingSyncComponents( | 290 ProfileSyncComponentsFactoryImpl::CreateExtensionOrAppSettingSyncComponents( |
| 283 syncable::ModelType type, | 291 syncable::ModelType type, |
| 284 ProfileSyncService* profile_sync_service, | 292 ProfileSyncService* profile_sync_service, |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 GenericChangeProcessor* change_processor = | 427 GenericChangeProcessor* change_processor = |
| 420 new GenericChangeProcessor(error_handler, | 428 new GenericChangeProcessor(error_handler, |
| 421 notif_sync_service, | 429 notif_sync_service, |
| 422 user_share); | 430 user_share); |
| 423 SyncableServiceAdapter* sync_service_adapter = | 431 SyncableServiceAdapter* sync_service_adapter = |
| 424 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS, | 432 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS, |
| 425 notif_sync_service, | 433 notif_sync_service, |
| 426 change_processor); | 434 change_processor); |
| 427 return SyncComponents(sync_service_adapter, change_processor); | 435 return SyncComponents(sync_service_adapter, change_processor); |
| 428 } | 436 } |
| OLD | NEW |