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 <utility> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "build/build_config.h" | 12 #include "build/build_config.h" |
11 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 13 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 14 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
13 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 15 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
14 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 16 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
15 #include "chrome/browser/favicon/favicon_service_factory.h" | 17 #include "chrome/browser/favicon/favicon_service_factory.h" |
16 #include "chrome/browser/history/history_service_factory.h" | 18 #include "chrome/browser/history/history_service_factory.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 password->RemoveLoginsSyncedBetween(start, end); | 483 password->RemoveLoginsSyncedBetween(start, end); |
482 } | 484 } |
483 | 485 |
484 void ChromeSyncClient::SetBrowsingDataRemoverObserverForTesting( | 486 void ChromeSyncClient::SetBrowsingDataRemoverObserverForTesting( |
485 BrowsingDataRemover::Observer* observer) { | 487 BrowsingDataRemover::Observer* observer) { |
486 browsing_data_remover_observer_ = observer; | 488 browsing_data_remover_observer_ = observer; |
487 } | 489 } |
488 | 490 |
489 void ChromeSyncClient::SetSyncApiComponentFactoryForTesting( | 491 void ChromeSyncClient::SetSyncApiComponentFactoryForTesting( |
490 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory) { | 492 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory) { |
491 component_factory_ = component_factory.Pass(); | 493 component_factory_ = std::move(component_factory); |
492 } | 494 } |
493 | 495 |
494 void ChromeSyncClient::RegisterDesktopDataTypes( | 496 void ChromeSyncClient::RegisterDesktopDataTypes( |
495 syncer::ModelTypeSet disabled_types, | 497 syncer::ModelTypeSet disabled_types, |
496 syncer::ModelTypeSet enabled_types) { | 498 syncer::ModelTypeSet enabled_types) { |
497 sync_driver::SyncService* sync_service = GetSyncService(); | 499 sync_driver::SyncService* sync_service = GetSyncService(); |
498 base::Closure error_callback = | 500 base::Closure error_callback = |
499 base::Bind(&ChromeReportUnrecoverableError, chrome::GetChannel()); | 501 base::Bind(&ChromeReportUnrecoverableError, chrome::GetChannel()); |
500 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread = | 502 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread = |
501 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); | 503 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 sync_service->RegisterDataTypeController( | 610 sync_service->RegisterDataTypeController( |
609 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS, | 611 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS, |
610 error_callback, this, profile_)); | 612 error_callback, this, profile_)); |
611 sync_service->RegisterDataTypeController( | 613 sync_service->RegisterDataTypeController( |
612 new SupervisedUserSyncDataTypeController( | 614 new SupervisedUserSyncDataTypeController( |
613 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 615 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
614 #endif | 616 #endif |
615 } | 617 } |
616 | 618 |
617 } // namespace browser_sync | 619 } // namespace browser_sync |
OLD | NEW |