Chromium Code Reviews| Index: components/reading_list/ios/reading_list_store.h |
| diff --git a/components/reading_list/ios/reading_list_store.h b/components/reading_list/ios/reading_list_store.h |
| index ab90ca43d584cee4962e813e9dbc97d72adf9a81..4dd3cfe88bc71469738958370b52dfa4afb5b842 100644 |
| --- a/components/reading_list/ios/reading_list_store.h |
| +++ b/components/reading_list/ios/reading_list_store.h |
| @@ -72,6 +72,21 @@ class ReadingListStore : public syncer::ModelTypeSyncBridge, |
| std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, |
| syncer::EntityChangeList entity_changes) override; |
| + // Returns whether entries respect a strict order for sync and if |rhs| can be |
| + // submitted to sync after |lhs| has been received. |
| + // The order should ensure that there is no sync loop in sync and should be |
| + // submitted to sync in strictly increasing order. |
| + // Entries are in increasing order if all the fields respect increasing order. |
| + // - URL must be the same. |
| + // - title must verify rhs.title.compare(lhs.title) >= 0 |
|
pavely
2016/12/07 19:16:06
I don't really understand why title is taken into
Olivier
2016/12/08 08:04:07
At the moment, title cannot be changed, so the onl
|
| + // - rhs.creation_time_us >= lhs.creation_time_us |
| + // - rhs.update_time_us >= lhs.update_time_us |
| + // - if rhs.update_time_us > lhs.update_time_us, rhs.state can be anything. |
| + // - if rhs.update_time_us == lhs.update_time_us, rhs.state >= lhs.state in |
| + // the order UNSEEN, UNREAD, READ. |
| + static bool CompareEntriesForSync(const sync_pb::ReadingListSpecifics& lhs, |
| + const sync_pb::ReadingListSpecifics& rhs); |
| + |
| // Asynchronously retrieve the corresponding sync data for |storage_keys|. |
| void GetData(StorageKeyList storage_keys, DataCallback callback) override; |