OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/sync/chrome_sync_client.h" | 5 #include "chrome/browser/sync/chrome_sync_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 8 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
10 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
11 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 11 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
12 #include "chrome/browser/favicon/favicon_service_factory.h" | 12 #include "chrome/browser/favicon/favicon_service_factory.h" |
13 #include "chrome/browser/history/history_service_factory.h" | 13 #include "chrome/browser/history/history_service_factory.h" |
| 14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
14 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
15 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 16 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
18 #include "chrome/browser/sync/glue/sync_start_util.h" | 19 #include "chrome/browser/sync/glue/sync_start_util.h" |
19 #include "chrome/browser/sync/profile_sync_service.h" | 20 #include "chrome/browser/sync/profile_sync_service.h" |
20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 21 #include "chrome/browser/sync/profile_sync_service_factory.h" |
21 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" | 22 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" |
22 #include "chrome/browser/themes/theme_service.h" | 23 #include "chrome/browser/themes/theme_service.h" |
23 #include "chrome/browser/themes/theme_service_factory.h" | 24 #include "chrome/browser/themes/theme_service_factory.h" |
24 #include "chrome/browser/themes/theme_syncable_service.h" | 25 #include "chrome/browser/themes/theme_syncable_service.h" |
25 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h" | 26 #include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h" |
26 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 27 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
27 #include "chrome/browser/web_data_service_factory.h" | 28 #include "chrome/browser/web_data_service_factory.h" |
28 #include "chrome/common/url_constants.h" | 29 #include "chrome/common/url_constants.h" |
29 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service
.h" | 30 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service
.h" |
30 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" | 31 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" |
31 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_sync
able_service.h" | 32 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_sync
able_service.h" |
32 #include "components/autofill/core/browser/webdata/autofill_wallet_syncable_serv
ice.h" | 33 #include "components/autofill/core/browser/webdata/autofill_wallet_syncable_serv
ice.h" |
33 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 34 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
34 #include "components/dom_distiller/core/dom_distiller_service.h" | 35 #include "components/dom_distiller/core/dom_distiller_service.h" |
35 #include "components/history/core/browser/history_model_worker.h" | 36 #include "components/history/core/browser/history_model_worker.h" |
36 #include "components/history/core/browser/history_service.h" | 37 #include "components/history/core/browser/history_service.h" |
| 38 #include "components/invalidation/impl/profile_invalidation_provider.h" |
37 #include "components/password_manager/core/browser/password_store.h" | 39 #include "components/password_manager/core/browser/password_store.h" |
38 #include "components/password_manager/sync/browser/password_model_worker.h" | 40 #include "components/password_manager/sync/browser/password_model_worker.h" |
39 #include "components/sync_driver/glue/browser_thread_model_worker.h" | 41 #include "components/sync_driver/glue/browser_thread_model_worker.h" |
40 #include "components/sync_driver/glue/ui_model_worker.h" | 42 #include "components/sync_driver/glue/ui_model_worker.h" |
41 #include "components/sync_driver/sync_api_component_factory.h" | 43 #include "components/sync_driver/sync_api_component_factory.h" |
42 #include "components/sync_sessions/sync_sessions_client.h" | 44 #include "components/sync_sessions/sync_sessions_client.h" |
43 #include "components/syncable_prefs/pref_service_syncable.h" | 45 #include "components/syncable_prefs/pref_service_syncable.h" |
44 #include "content/public/browser/browser_thread.h" | 46 #include "content/public/browser/browser_thread.h" |
45 #include "sync/internal_api/public/engine/passive_model_worker.h" | 47 #include "sync/internal_api/public/engine/passive_model_worker.h" |
46 | 48 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 ChromeSyncClient::GetWebDataService() { | 213 ChromeSyncClient::GetWebDataService() { |
212 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 214 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
213 return WebDataServiceFactory::GetAutofillWebDataForProfile( | 215 return WebDataServiceFactory::GetAutofillWebDataForProfile( |
214 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 216 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
215 } | 217 } |
216 | 218 |
217 BookmarkUndoService* ChromeSyncClient::GetBookmarkUndoServiceIfExists() { | 219 BookmarkUndoService* ChromeSyncClient::GetBookmarkUndoServiceIfExists() { |
218 return BookmarkUndoServiceFactory::GetForProfileIfExists(profile_); | 220 return BookmarkUndoServiceFactory::GetForProfileIfExists(profile_); |
219 } | 221 } |
220 | 222 |
| 223 invalidation::InvalidationService* ChromeSyncClient::GetInvalidationService() { |
| 224 invalidation::ProfileInvalidationProvider* provider = |
| 225 invalidation::ProfileInvalidationProviderFactory::GetForProfile(profile_); |
| 226 if (provider) |
| 227 return provider->GetInvalidationService(); |
| 228 return nullptr; |
| 229 } |
| 230 |
221 scoped_refptr<syncer::ExtensionsActivity> | 231 scoped_refptr<syncer::ExtensionsActivity> |
222 ChromeSyncClient::GetExtensionsActivity() { | 232 ChromeSyncClient::GetExtensionsActivity() { |
223 return extensions_activity_monitor_.GetExtensionsActivity(); | 233 return extensions_activity_monitor_.GetExtensionsActivity(); |
224 } | 234 } |
225 | 235 |
226 sync_sessions::SyncSessionsClient* ChromeSyncClient::GetSyncSessionsClient() { | 236 sync_sessions::SyncSessionsClient* ChromeSyncClient::GetSyncSessionsClient() { |
227 return sync_sessions_client_.get(); | 237 return sync_sessions_client_.get(); |
228 } | 238 } |
229 | 239 |
230 base::WeakPtr<syncer::SyncableService> | 240 base::WeakPtr<syncer::SyncableService> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ServiceAccessType::EXPLICIT_ACCESS); | 421 ServiceAccessType::EXPLICIT_ACCESS); |
412 password->RemoveLoginsSyncedBetween(start, end); | 422 password->RemoveLoginsSyncedBetween(start, end); |
413 } | 423 } |
414 | 424 |
415 void ChromeSyncClient::SetBrowsingDataRemoverObserverForTesting( | 425 void ChromeSyncClient::SetBrowsingDataRemoverObserverForTesting( |
416 BrowsingDataRemover::Observer* observer) { | 426 BrowsingDataRemover::Observer* observer) { |
417 browsing_data_remover_observer_ = observer; | 427 browsing_data_remover_observer_ = observer; |
418 } | 428 } |
419 | 429 |
420 } // namespace browser_sync | 430 } // namespace browser_sync |
OLD | NEW |