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 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_ENTRY_H_ | 5 #ifndef COMPONENTS_READING_LIST_READING_LIST_ENTRY_H_ |
6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_ENTRY_H_ | 6 #define COMPONENTS_READING_LIST_READING_LIST_ENTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "net/base/backoff_entry.h" | 13 #include "net/base/backoff_entry.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace reading_list { | 16 namespace reading_list { |
(...skipping 29 matching lines...) Expand all Loading... |
46 | 46 |
47 // The URL of the page the user would like to read later. | 47 // The URL of the page the user would like to read later. |
48 const GURL& URL() const; | 48 const GURL& URL() const; |
49 // The title of the entry. Might be empty. | 49 // The title of the entry. Might be empty. |
50 const std::string& Title() const; | 50 const std::string& Title() const; |
51 // What state this entry is in. | 51 // What state this entry is in. |
52 DistillationState DistilledState() const; | 52 DistillationState DistilledState() const; |
53 // The local file path for the distilled version of the page. This should only | 53 // The local file path for the distilled version of the page. This should only |
54 // be called if the state is "PROCESSED". | 54 // be called if the state is "PROCESSED". |
55 const base::FilePath& DistilledPath() const; | 55 const base::FilePath& DistilledPath() const; |
56 // The URL to the distilled file. | |
57 const GURL DistilledURL() const; | |
58 // The time before the next try. This is automatically increased when the | 56 // The time before the next try. This is automatically increased when the |
59 // state is set to WILL_RETRY or ERROR from a non-error state. | 57 // state is set to WILL_RETRY or ERROR from a non-error state. |
60 base::TimeDelta TimeUntilNextTry() const; | 58 base::TimeDelta TimeUntilNextTry() const; |
61 // The number of time chrome failed to download this entry. This is | 59 // The number of time chrome failed to download this entry. This is |
62 // automatically increased when the state is set to WILL_RETRY or ERROR from a | 60 // automatically increased when the state is set to WILL_RETRY or ERROR from a |
63 // non-error state. | 61 // non-error state. |
64 int FailedDownloadCounter() const; | 62 int FailedDownloadCounter() const; |
65 | 63 |
66 // The last update time of the entry. This value may be used to sort the | 64 // The last update time of the entry. This value may be used to sort the |
67 // entries. The value is in microseconds since Jan 1st 1970. | 65 // entries. The value is in microseconds since Jan 1st 1970. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 130 |
133 // These value are in microseconds since Jan 1st 1970. They are used for | 131 // These value are in microseconds since Jan 1st 1970. They are used for |
134 // sorting the entries from the database. They are kept in int64_t to avoid | 132 // sorting the entries from the database. They are kept in int64_t to avoid |
135 // conversion on each save/read event. | 133 // conversion on each save/read event. |
136 int64_t creation_time_us_; | 134 int64_t creation_time_us_; |
137 int64_t update_time_us_; | 135 int64_t update_time_us_; |
138 | 136 |
139 DISALLOW_COPY_AND_ASSIGN(ReadingListEntry); | 137 DISALLOW_COPY_AND_ASSIGN(ReadingListEntry); |
140 }; | 138 }; |
141 | 139 |
142 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_ENTRY_H_ | 140 #endif // COMPONENTS_READING_LIST_READING_LIST_ENTRY_H_ |
OLD | NEW |