OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/glue/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/invalidation/invalidation_service.h" | 9 #include "chrome/browser/invalidation/invalidation_service.h" |
10 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 10 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 486 |
487 void SyncBackendHostImpl::DisableProtocolEventForwarding() { | 487 void SyncBackendHostImpl::DisableProtocolEventForwarding() { |
488 DCHECK(initialized()); | 488 DCHECK(initialized()); |
489 registrar_->sync_thread()->message_loop()->PostTask( | 489 registrar_->sync_thread()->message_loop()->PostTask( |
490 FROM_HERE, | 490 FROM_HERE, |
491 base::Bind( | 491 base::Bind( |
492 &SyncBackendHostCore::DisableProtocolEventForwarding, | 492 &SyncBackendHostCore::DisableProtocolEventForwarding, |
493 core_)); | 493 core_)); |
494 } | 494 } |
495 | 495 |
| 496 void SyncBackendHostImpl::GetAllNodesForTypes( |
| 497 syncer::ModelTypeSet types, |
| 498 base::Callback<void(std::vector<syncer::ModelType>, |
| 499 ScopedVector<base::ListValue>)> callback) { |
| 500 DCHECK(initialized()); |
| 501 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, |
| 502 base::Bind( |
| 503 &SyncBackendHostCore::GetAllNodesForTypes, |
| 504 core_, |
| 505 types, |
| 506 frontend_loop_->message_loop_proxy(), |
| 507 callback)); |
| 508 } |
| 509 |
496 void SyncBackendHostImpl::InitCore(scoped_ptr<DoInitializeOptions> options) { | 510 void SyncBackendHostImpl::InitCore(scoped_ptr<DoInitializeOptions> options) { |
497 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, | 511 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, |
498 base::Bind(&SyncBackendHostCore::DoInitialize, | 512 base::Bind(&SyncBackendHostCore::DoInitialize, |
499 core_.get(), base::Passed(&options))); | 513 core_.get(), base::Passed(&options))); |
500 } | 514 } |
501 | 515 |
502 void SyncBackendHostImpl::RequestConfigureSyncer( | 516 void SyncBackendHostImpl::RequestConfigureSyncer( |
503 syncer::ConfigureReason reason, | 517 syncer::ConfigureReason reason, |
504 syncer::ModelTypeSet to_download, | 518 syncer::ModelTypeSet to_download, |
505 syncer::ModelTypeSet to_purge, | 519 syncer::ModelTypeSet to_purge, |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 788 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
775 return registrar_->sync_thread()->message_loop(); | 789 return registrar_->sync_thread()->message_loop(); |
776 } | 790 } |
777 | 791 |
778 } // namespace browser_sync | 792 } // namespace browser_sync |
779 | 793 |
780 #undef SDVLOG | 794 #undef SDVLOG |
781 | 795 |
782 #undef SLOG | 796 #undef SLOG |
783 | 797 |
OLD | NEW |