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

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

Issue 2553143002: Create a strict order in ReadingListSpecifics (Closed)
Patch Set: comments 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_model_impl.cc
diff --git a/components/reading_list/ios/reading_list_model_impl.cc b/components/reading_list/ios/reading_list_model_impl.cc
index fb010a20ef157d3b8c8470d56760cef38911b4c0..14cd81ce5a6fe226fa5fc7442e9d0bc4452d8c66 100644
--- a/components/reading_list/ios/reading_list_model_impl.cc
+++ b/components/reading_list/ios/reading_list_model_impl.cc
@@ -152,8 +152,6 @@ ReadingListEntry* ReadingListModelImpl::SyncMergeEntry(
DCHECK(loaded());
ReadingListEntry* existing_entry = GetMutableEntryFromURL(entry->URL());
DCHECK(existing_entry);
- DCHECK(existing_entry->UpdateTime() < entry->UpdateTime());
-
GURL url = entry->URL();
for (auto& observer : observers_)
@@ -164,10 +162,7 @@ ReadingListEntry* ReadingListModelImpl::SyncMergeEntry(
} else {
unread_entry_count_--;
}
- // Merge local data in new entry.
- entry->MergeLocalStateFrom(*existing_entry);
-
- entries_->find(url)->second = std::move(*entry);
+ existing_entry->MergeWithEntry(*entry);
existing_entry = GetMutableEntryFromURL(url);
if (existing_entry->IsRead()) {

Powered by Google App Engine
This is Rietveld 408576698