OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/reading_list/reading_list_entry.h" | 5 #include "components/reading_list/ios/reading_list_entry.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "components/reading_list/offline_url_utils.h" | 9 #include "components/reading_list/ios/offline_url_utils.h" |
10 #include "components/reading_list/proto/reading_list.pb.h" | 10 #include "components/reading_list/ios/proto/reading_list.pb.h" |
11 #include "components/sync/protocol/reading_list_specifics.pb.h" | 11 #include "components/sync/protocol/reading_list_specifics.pb.h" |
12 #include "net/base/backoff_entry_serializer.h" | 12 #include "net/base/backoff_entry_serializer.h" |
13 | 13 |
14 // The backoff time is the following: 10min, 10min, 1h, 2h, 2h..., starting | 14 // The backoff time is the following: 10min, 10min, 1h, 2h, 2h..., starting |
15 // after the first failure. | 15 // after the first failure. |
16 const net::BackoffEntry::Policy ReadingListEntry::kBackoffPolicy = { | 16 const net::BackoffEntry::Policy ReadingListEntry::kBackoffPolicy = { |
17 // Number of initial errors (in sequence) to ignore before applying | 17 // Number of initial errors (in sequence) to ignore before applying |
18 // exponential back-off rules. | 18 // exponential back-off rules. |
19 2, | 19 2, |
20 | 20 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 pb_entry->set_status(sync_pb::ReadingListSpecifics::UNREAD); | 361 pb_entry->set_status(sync_pb::ReadingListSpecifics::UNREAD); |
362 } | 362 } |
363 | 363 |
364 return pb_entry; | 364 return pb_entry; |
365 } | 365 } |
366 | 366 |
367 bool ReadingListEntry::CompareEntryUpdateTime(const ReadingListEntry& lhs, | 367 bool ReadingListEntry::CompareEntryUpdateTime(const ReadingListEntry& lhs, |
368 const ReadingListEntry& rhs) { | 368 const ReadingListEntry& rhs) { |
369 return lhs.UpdateTime() > rhs.UpdateTime(); | 369 return lhs.UpdateTime() > rhs.UpdateTime(); |
370 } | 370 } |
OLD | NEW |