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

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

Issue 2553143002: Create a strict order in ReadingListSpecifics (Closed)
Patch Set: for review 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..af01ea8a38abd1ab2af4a8b0e59d1e3a5c7b81a7 100644
--- a/components/reading_list/ios/reading_list_model_impl.cc
+++ b/components/reading_list/ios/reading_list_model_impl.cc
@@ -152,7 +152,7 @@ ReadingListEntry* ReadingListModelImpl::SyncMergeEntry(
DCHECK(loaded());
ReadingListEntry* existing_entry = GetMutableEntryFromURL(entry->URL());
DCHECK(existing_entry);
- DCHECK(existing_entry->UpdateTime() < entry->UpdateTime());
+ // DCHECK(existing_entry->UpdateTime() < entry->UpdateTime());
gambard 2016/12/06 17:02:22 Remove it?
Olivier 2016/12/06 17:16:21 Done.
GURL url = entry->URL();
@@ -164,10 +164,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