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

Unified Diff: components/reading_list/ios/reading_list_store.cc

Issue 2558183004: Add merge rules for first read time (Closed)
Patch Set: =0 Created 4 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: components/reading_list/ios/reading_list_store.cc
diff --git a/components/reading_list/ios/reading_list_store.cc b/components/reading_list/ios/reading_list_store.cc
index 26ebf29b55883cfec96352ba668f9fa526aedac9..beb300bfc62eaab3f59d24a67f8fce7aa37d0485 100644
--- a/components/reading_list/ios/reading_list_store.cc
+++ b/components/reading_list/ios/reading_list_store.cc
@@ -442,5 +442,14 @@ bool ReadingListStore::CompareEntriesForSync(
lhs.status() == sync_pb::ReadingListSpecifics::READ))
return false;
}
+ if (rhs.creation_time_us() == lhs.creation_time_us()) {
+ if (rhs.first_read_time_us() == 0 && lhs.first_read_time_us() != 0) {
+ return false;
+ }
+ if (rhs.first_read_time_us() > lhs.first_read_time_us() &&
+ lhs.first_read_time_us() != 0) {
+ return false;
+ }
+ }
return true;
}
« no previous file with comments | « components/reading_list/ios/reading_list_store.h ('k') | components/reading_list/ios/reading_list_store_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698