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

Unified Diff: components/sync/test/engine/mock_model_type_worker.cc

Issue 2935583002: [Sync] Implement support for untracking new entities (Closed)
Patch Set: add comments Created 3 years, 6 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/test/engine/mock_model_type_worker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/test/engine/mock_model_type_worker.cc
diff --git a/components/sync/test/engine/mock_model_type_worker.cc b/components/sync/test/engine/mock_model_type_worker.cc
index ac53569f8fcc6c5cd22cdbd1ba7ae3a923764b1e..442cf4a5e1f2a2f6b638e88a4bbaf02b928d75a9 100644
--- a/components/sync/test/engine/mock_model_type_worker.cc
+++ b/components/sync/test/engine/mock_model_type_worker.cc
@@ -118,6 +118,11 @@ void MockModelTypeWorker::UpdateFromServer(
UpdateResponseDataList updates;
updates.push_back(
GenerateUpdateData(tag_hash, specifics, version_offset, ekn));
+ UpdateFromServer(updates);
+}
+
+void MockModelTypeWorker::UpdateFromServer(
+ const UpdateResponseDataList& updates) {
processor_->OnUpdateReceived(model_type_state_, updates);
}
@@ -152,6 +157,13 @@ UpdateResponseData MockModelTypeWorker::GenerateUpdateData(
return response_data;
}
+UpdateResponseData MockModelTypeWorker::GenerateUpdateData(
+ const std::string& tag_hash,
+ const sync_pb::EntitySpecifics& specifics) {
+ return GenerateUpdateData(tag_hash, specifics, 1,
+ model_type_state_.encryption_key_name());
+}
+
void MockModelTypeWorker::TombstoneFromServer(const std::string& tag_hash) {
int64_t old_version = GetServerVersion(tag_hash);
int64_t version = old_version + 1;
« no previous file with comments | « components/sync/test/engine/mock_model_type_worker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698