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

Unified Diff: sync/syncable/mutable_entry.cc

Issue 11441026: [Sync] Add support for loading, updating and querying delete journals in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and update Created 8 years 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/syncable/mutable_entry.cc
diff --git a/sync/syncable/mutable_entry.cc b/sync/syncable/mutable_entry.cc
index 5090ad1a9116739a00d89ae6f6952ec9c765acaa..bf051c623447457749ed098305e9ebc730448db7 100644
--- a/sync/syncable/mutable_entry.cc
+++ b/sync/syncable/mutable_entry.cc
@@ -273,9 +273,13 @@ bool MutableEntry::Put(ProtoField field,
bool MutableEntry::Put(BitField field, bool value) {
DCHECK(kernel_);
write_transaction_->SaveOriginal(kernel_);
- if (kernel_->ref(field) != value) {
+ bool old_value = kernel_->ref(field);
+ if (old_value != value) {
kernel_->put(field, value);
kernel_->mark_dirty(GetDirtyIndexHelper());
+
+ if (field == SERVER_IS_DEL)
tim (not reviewing) 2012/12/13 02:48:10 This can't be IS_DEL (and hence live in PutIsDel)
haitaol1 2012/12/13 21:34:21 I think it's more accurate to use SERVER_IS_DEL to
+ dir()->UpdateDeleteJournals(write_transaction(), old_value, kernel_);
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698