Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 SYNC_API_SYNC_CHANGE_PROCESSOR_DELEGATOR_H_ | |
| 6 #define SYNC_API_SYNC_CHANGE_PROCESSOR_DELEGATOR_H_ | |
| 7 | |
| 8 #include "sync/api/sync_change_processor.h" | |
| 9 | |
| 10 namespace syncer { | |
| 11 | |
| 12 // A delegator for use in unit tests. | |
|
tim (not reviewing)
2014/02/06 19:26:47
Let's put Test in the name of this class somehow t
maniscalco
2014/02/06 20:05:27
Good idea. Renamed to SyncChangeProcessorWrapperF
| |
| 13 class SyncChangeProcessorDelegator : public SyncChangeProcessor { | |
| 14 public: | |
| 15 // Create a SyncChangeProcessorDelegator. | |
| 16 // | |
| 17 // All method calls are forwarded to |recipient|. Caller maintains ownership | |
| 18 // of |recipient| and is responsible for ensuring it outlives this object. | |
| 19 SyncChangeProcessorDelegator(syncer::SyncChangeProcessor* recipient); | |
|
tim (not reviewing)
2014/02/06 19:26:47
single arg constructors should be explicit.
maniscalco
2014/02/06 20:05:27
Done.
| |
| 20 virtual ~SyncChangeProcessorDelegator(); | |
| 21 | |
| 22 // SyncChangeProcessor implementation. | |
| 23 virtual syncer::SyncError ProcessSyncChanges( | |
| 24 const tracked_objects::Location& from_here, | |
| 25 const syncer::SyncChangeList& change_list) OVERRIDE; | |
| 26 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) | |
| 27 const OVERRIDE; | |
| 28 | |
| 29 private: | |
| 30 syncer::SyncChangeProcessor* const recipient_; | |
|
tim (not reviewing)
2014/02/06 19:26:47
nit - wrapped_ might be a better name.
maniscalco
2014/02/06 20:05:27
Done.
| |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegator); | |
| 33 }; | |
| 34 | |
| 35 } // namespace syncer | |
| 36 | |
| 37 #endif // SYNC_API_SYNC_CHANGE_PROCESSOR_DELEGATOR_H_ | |
| OLD | NEW |