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

Side by Side Diff: components/sync/core/model_type_processor_proxy.cc

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 years, 2 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/sync/core/model_type_processor_proxy.h"
6
7 #include <utility>
8
9 #include "base/bind.h"
10 #include "base/location.h"
11 #include "components/sync/engine/commit_queue.h"
12
13 namespace syncer {
14
15 ModelTypeProcessorProxy::ModelTypeProcessorProxy(
16 const base::WeakPtr<ModelTypeProcessor>& processor,
17 const scoped_refptr<base::SequencedTaskRunner>& task_runner)
18 : processor_(processor), task_runner_(task_runner) {}
19
20 ModelTypeProcessorProxy::~ModelTypeProcessorProxy() {}
21
22 void ModelTypeProcessorProxy::ConnectSync(std::unique_ptr<CommitQueue> worker) {
23 task_runner_->PostTask(
24 FROM_HERE, base::Bind(&ModelTypeProcessor::ConnectSync, processor_,
25 base::Passed(std::move(worker))));
26 }
27
28 void ModelTypeProcessorProxy::DisconnectSync() {
29 task_runner_->PostTask(
30 FROM_HERE, base::Bind(&ModelTypeProcessor::DisconnectSync, processor_));
31 }
32
33 void ModelTypeProcessorProxy::OnCommitCompleted(
34 const sync_pb::ModelTypeState& type_state,
35 const CommitResponseDataList& response_list) {
36 task_runner_->PostTask(
37 FROM_HERE, base::Bind(&ModelTypeProcessor::OnCommitCompleted, processor_,
38 type_state, response_list));
39 }
40
41 void ModelTypeProcessorProxy::OnUpdateReceived(
42 const sync_pb::ModelTypeState& type_state,
43 const UpdateResponseDataList& updates) {
44 task_runner_->PostTask(
45 FROM_HERE, base::Bind(&ModelTypeProcessor::OnUpdateReceived, processor_,
46 type_state, updates));
47 }
48
49 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core/model_type_processor_proxy.h ('k') | components/sync/core/non_blocking_sync_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698