Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2276943006: [USS] Move GetAllNodes from backend to controller (Closed)
Patch Set: update for Max Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/sync/driver/glue/sync_backend_host_impl.h" 5 #include "components/sync/driver/glue/sync_backend_host_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 void SyncBackendHostImpl::DisableDirectoryTypeDebugInfoForwarding() { 515 void SyncBackendHostImpl::DisableDirectoryTypeDebugInfoForwarding() {
516 DCHECK(initialized()); 516 DCHECK(initialized());
517 registrar_->sync_thread()->task_runner()->PostTask( 517 registrar_->sync_thread()->task_runner()->PostTask(
518 FROM_HERE, 518 FROM_HERE,
519 base::Bind(&SyncBackendHostCore::DisableDirectoryTypeDebugInfoForwarding, 519 base::Bind(&SyncBackendHostCore::DisableDirectoryTypeDebugInfoForwarding,
520 core_)); 520 core_));
521 } 521 }
522 522
523 void SyncBackendHostImpl::GetAllNodesForTypes(
524 syncer::ModelTypeSet types,
525 base::Callback<void(const std::vector<syncer::ModelType>&,
526 std::vector<std::unique_ptr<base::ListValue>>)>
527 callback) {
528 DCHECK(initialized());
529 registrar_->sync_thread()->task_runner()->PostTask(
530 FROM_HERE, base::Bind(&SyncBackendHostCore::GetAllNodesForTypes, core_,
531 types, frontend_task_runner_, callback));
532 }
533
534 void SyncBackendHostImpl::InitCore( 523 void SyncBackendHostImpl::InitCore(
535 std::unique_ptr<DoInitializeOptions> options) { 524 std::unique_ptr<DoInitializeOptions> options) {
536 registrar_->sync_thread()->task_runner()->PostTask( 525 registrar_->sync_thread()->task_runner()->PostTask(
537 FROM_HERE, base::Bind(&SyncBackendHostCore::DoInitialize, core_.get(), 526 FROM_HERE, base::Bind(&SyncBackendHostCore::DoInitialize, core_.get(),
538 base::Passed(&options))); 527 base::Passed(&options)));
539 } 528 }
540 529
541 void SyncBackendHostImpl::RequestConfigureSyncer( 530 void SyncBackendHostImpl::RequestConfigureSyncer(
542 syncer::ConfigureReason reason, 531 syncer::ConfigureReason reason,
543 syncer::ModelTypeSet to_download, 532 syncer::ModelTypeSet to_download,
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) { 839 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) {
851 DCHECK(ui_thread_->BelongsToCurrentThread()); 840 DCHECK(ui_thread_->BelongsToCurrentThread());
852 frontend_callback.Run(); 841 frontend_callback.Run();
853 } 842 }
854 843
855 } // namespace browser_sync 844 } // namespace browser_sync
856 845
857 #undef SDVLOG 846 #undef SDVLOG
858 847
859 #undef SLOG 848 #undef SLOG
OLDNEW
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/driver/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698