| OLD | NEW |
| (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 #ifndef COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_ | |
| 6 #define COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "base/sequenced_task_runner.h" | |
| 13 #include "components/sync/core/model_type_processor.h" | |
| 14 | |
| 15 namespace syncer { | |
| 16 | |
| 17 class ModelTypeProcessorProxy : public ModelTypeProcessor { | |
| 18 public: | |
| 19 ModelTypeProcessorProxy( | |
| 20 const base::WeakPtr<ModelTypeProcessor>& processor, | |
| 21 const scoped_refptr<base::SequencedTaskRunner>& task_runner); | |
| 22 ~ModelTypeProcessorProxy() override; | |
| 23 | |
| 24 void ConnectSync(std::unique_ptr<CommitQueue> worker) override; | |
| 25 void DisconnectSync() override; | |
| 26 void OnCommitCompleted(const sync_pb::ModelTypeState& type_state, | |
| 27 const CommitResponseDataList& response_list) override; | |
| 28 void OnUpdateReceived(const sync_pb::ModelTypeState& type_state, | |
| 29 const UpdateResponseDataList& updates) override; | |
| 30 | |
| 31 private: | |
| 32 base::WeakPtr<ModelTypeProcessor> processor_; | |
| 33 scoped_refptr<base::SequencedTaskRunner> task_runner_; | |
| 34 }; | |
| 35 | |
| 36 } // namespace syncer | |
| 37 | |
| 38 #endif // COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_ | |
| OLD | NEW |