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

Unified Diff: sync/syncable/mutable_entry.cc

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/test/engine/test_directory_setter_upper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/mutable_entry.cc
diff --git a/sync/syncable/mutable_entry.cc b/sync/syncable/mutable_entry.cc
index 23531287a764df3eb09e5d22d648b10864543543..70b2a268ae7a81dea47a0db8ecf2378483cb6e32 100644
--- a/sync/syncable/mutable_entry.cc
+++ b/sync/syncable/mutable_entry.cc
@@ -289,17 +289,18 @@ bool MutableEntry::Put(BitField field, bool value) {
if (old_value != value) {
kernel_->put(field, value);
kernel_->mark_dirty(GetDirtyIndexHelper());
+ }
- // Update delete journal for existence status change on server side here
- // instead of in PutIsDel() because IS_DEL may not be updated due to
- // early returns when processing updates. And because
- // UpdateDeleteJournalForServerDelete() checks for SERVER_IS_DEL, it has
- // to be called on sync thread.
- if (field == SERVER_IS_DEL) {
- dir()->delete_journal()->UpdateDeleteJournalForServerDelete(
- write_transaction(), old_value, *kernel_);
- }
+ // Update delete journal for existence status change on server side here
+ // instead of in PutIsDel() because IS_DEL may not be updated due to
+ // early returns when processing updates. And because
+ // UpdateDeleteJournalForServerDelete() checks for SERVER_IS_DEL, it has
+ // to be called on sync thread.
+ if (field == SERVER_IS_DEL) {
+ dir()->delete_journal()->UpdateDeleteJournalForServerDelete(
+ write_transaction(), old_value, *kernel_);
}
+
return true;
}
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/test/engine/test_directory_setter_upper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698