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

Unified Diff: sync/api/fake_sync_change_processor.cc

Issue 151963002: Remove duplicated code from sync related unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename SyncChangeProcessorDelgate to SyncChangeProcessorDelgator. Created 6 years, 11 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
Index: sync/api/fake_sync_change_processor.cc
diff --git a/sync/api/fake_sync_change_processor.cc b/sync/api/fake_sync_change_processor.cc
index f8d2f40ccacd24c8eaf6c232197f5e677a9132c0..83d669e1b2804893633c0d5bd835d8f805eef73e 100644
--- a/sync/api/fake_sync_change_processor.cc
+++ b/sync/api/fake_sync_change_processor.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "sync/api/fake_sync_change_processor.h"
+#include "sync/api/sync_change.h"
+#include "sync/api/sync_data.h"
namespace syncer {
@@ -13,6 +15,8 @@ FakeSyncChangeProcessor::~FakeSyncChangeProcessor() {}
syncer::SyncError FakeSyncChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const syncer::SyncChangeList& change_list) {
+ change_list_.insert(
+ change_list_.end(), change_list.begin(), change_list.end());
return syncer::SyncError();
}
@@ -21,4 +25,12 @@ syncer::SyncDataList FakeSyncChangeProcessor::GetAllSyncData(
return syncer::SyncDataList();
}
+const syncer::SyncChangeList& FakeSyncChangeProcessor::changes() const {
+ return change_list_;
+}
+
+syncer::SyncChangeList& FakeSyncChangeProcessor::changes() {
+ return change_list_;
+}
+
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698