Index: sync/api/sync_change_processor_wrapper_for_test.h |
diff --git a/sync/api/sync_change_processor_wrapper_for_test.h b/sync/api/sync_change_processor_wrapper_for_test.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b975da2891863438fca203f7819fe04ca3996043 |
--- /dev/null |
+++ b/sync/api/sync_change_processor_wrapper_for_test.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SYNC_API_SYNC_CHANGE_PROCESSOR_WRAPPER_FOR_TEST_H_ |
+#define SYNC_API_SYNC_CHANGE_PROCESSOR_WRAPPER_FOR_TEST_H_ |
+ |
+#include "sync/api/sync_change_processor.h" |
+ |
+namespace syncer { |
+ |
+// A wrapper class for use in tests. |
+class SyncChangeProcessorWrapperForTest : public SyncChangeProcessor { |
+ public: |
+ // Create a SyncChangeProcessorWrapperForTest. |
+ // |
+ // All method calls are forwarded to |wrapped|. Caller maintains ownership |
+ // of |wrapped| and is responsible for ensuring it outlives this object. |
+ explicit SyncChangeProcessorWrapperForTest( |
+ syncer::SyncChangeProcessor* wrapped); |
+ virtual ~SyncChangeProcessorWrapperForTest(); |
+ |
+ // SyncChangeProcessor implementation. |
+ virtual syncer::SyncError ProcessSyncChanges( |
+ const tracked_objects::Location& from_here, |
+ const syncer::SyncChangeList& change_list) OVERRIDE; |
+ virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) |
+ const OVERRIDE; |
+ |
+ private: |
+ syncer::SyncChangeProcessor* const wrapped_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorWrapperForTest); |
+}; |
+ |
+} // namespace syncer |
+ |
+#endif // SYNC_API_SYNC_CHANGE_PROCESSOR_WRAPPER_FOR_TEST_H_ |