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

Unified Diff: components/sync/core/model_type_processor_proxy.h

Issue 2384153004: [Sync] Merge NBDTC and subclasses into ModelTypeController. (Closed)
Patch Set: Fix bad rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/BUILD.gn ('k') | components/sync/core/model_type_processor_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/model_type_processor_proxy.h
diff --git a/components/sync/core/test/fake_model_type_processor.h b/components/sync/core/model_type_processor_proxy.h
similarity index 51%
copy from components/sync/core/test/fake_model_type_processor.h
copy to components/sync/core/model_type_processor_proxy.h
index 8fc866d3e835fecc1c3a659f708bcf0856397af2..3a08d3f319104aff8982e3fdc2bef02731da949a 100644
--- a/components/sync/core/test/fake_model_type_processor.h
+++ b/components/sync/core/model_type_processor_proxy.h
@@ -2,29 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SYNC_CORE_TEST_FAKE_MODEL_TYPE_PROCESSOR_H_
-#define COMPONENTS_SYNC_CORE_TEST_FAKE_MODEL_TYPE_PROCESSOR_H_
+#ifndef COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_
+#define COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_
#include <memory>
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/sequenced_task_runner.h"
#include "components/sync/core/model_type_processor.h"
namespace syncer {
-class FakeModelTypeProcessor : public ModelTypeProcessor {
+class ModelTypeProcessorProxy : public ModelTypeProcessor {
public:
- FakeModelTypeProcessor();
- ~FakeModelTypeProcessor() override;
+ ModelTypeProcessorProxy(
+ const base::WeakPtr<ModelTypeProcessor>& processor,
+ const scoped_refptr<base::SequencedTaskRunner>& task_runner);
+ ~ModelTypeProcessorProxy() override;
- // ModelTypeProcessor implementation.
void ConnectSync(std::unique_ptr<CommitQueue> worker) override;
void DisconnectSync() override;
void OnCommitCompleted(const sync_pb::ModelTypeState& type_state,
const CommitResponseDataList& response_list) override;
void OnUpdateReceived(const sync_pb::ModelTypeState& type_state,
const UpdateResponseDataList& updates) override;
+
+ private:
+ base::WeakPtr<ModelTypeProcessor> processor_;
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
};
} // namespace syncer
-#endif // COMPONENTS_SYNC_CORE_TEST_FAKE_MODEL_TYPE_PROCESSOR_H_
+#endif // COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_PROXY_H_
« no previous file with comments | « components/sync/BUILD.gn ('k') | components/sync/core/model_type_processor_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698