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

Unified Diff: components/sync/engine_impl/worker_entity_tracker.cc

Issue 2611123005: [Sync] ModelTypeWorker should delete tracker for entity deleted on the server (Closed)
Patch Set: Rebase Created 3 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: components/sync/engine_impl/worker_entity_tracker.cc
diff --git a/components/sync/engine_impl/worker_entity_tracker.cc b/components/sync/engine_impl/worker_entity_tracker.cc
index 8632e291579bc76960c53f2c65d1817a947b45f0..24b306a6a555ed682e5dd1857cba7a4b448d65b7 100644
--- a/components/sync/engine_impl/worker_entity_tracker.cc
+++ b/components/sync/engine_impl/worker_entity_tracker.cc
@@ -25,6 +25,11 @@ bool WorkerEntityTracker::HasPendingCommit() const {
return !!pending_commit_;
}
+bool WorkerEntityTracker::IsTombstone() const {
+ DCHECK(pending_commit_);
+ return pending_commit_->entity.value().is_deleted();
+}
+
void WorkerEntityTracker::PopulateCommitProto(
sync_pb::SyncEntity* commit_entity) const {
DCHECK(HasPendingCommit());

Powered by Google App Engine
This is Rietveld 408576698