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

Unified Diff: components/reading_list/ios/reading_list_entry.h

Issue 2707043002: [Reading List iOS] Store distillation date and size. (Closed)
Patch Set: Created 3 years, 10 months 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_entry.h
diff --git a/components/reading_list/ios/reading_list_entry.h b/components/reading_list/ios/reading_list_entry.h
index 6cb2716ebc60644fb168846a9095ea80fb6565ae..7ddb7a505e1c2a190df82cd1bb3e8e5e42d02aba 100644
--- a/components/reading_list/ios/reading_list_entry.h
+++ b/components/reading_list/ios/reading_list_entry.h
@@ -61,6 +61,11 @@ class ReadingListEntry {
const base::FilePath& DistilledPath() const;
// The URL that has been distilled to produce file stored at |DistilledPath|.
const GURL& DistilledURL() const;
+ // The time distillation was done. The value is in microseconds since Jan 1st
+ // 1970.
+ int64_t DistillationTime() const;
+ // The size of the stored page in bytes.
+ int64_t DistillationSize() const;
// The time before the next try. This is automatically increased when the
// state is set to WILL_RETRY or ERROR from a non-error state.
base::TimeDelta TimeUntilNextTry() const;
@@ -126,9 +131,12 @@ class ReadingListEntry {
// Sets the title.
void SetTitle(const std::string& title);
- // Sets the distilled info (offline path and online URL) about distilled page,
- // switch the state to PROCESSED and reset the time until the next try.
- void SetDistilledInfo(const base::FilePath& path, const GURL& distilled_url);
+ // Sets the distilled info (offline path, online URL and size of the stored
+ // files) about distilled page, switch the state to PROCESSED and reset the
+ // time until the next try.
+ void SetDistilledInfo(const base::FilePath& path,
+ const GURL& distilled_url,
+ int64_t size);
// Sets the state to one of PROCESSING, WILL_RETRY or ERROR.
void SetDistilledState(DistillationState distilled_state);
// Sets the read state of the entry. Will set the UpdateTime of the entry.
@@ -146,6 +154,8 @@ class ReadingListEntry {
ReadingListEntry::DistillationState distilled_state,
const base::FilePath& distilled_path,
const GURL& distilled_url,
+ int64_t distillation_time,
+ int64_t distillation_size,
int failed_download_counter,
std::unique_ptr<net::BackoffEntry> backoff);
GURL url_;
@@ -165,6 +175,8 @@ class ReadingListEntry {
int64_t first_read_time_us_;
int64_t update_time_us_;
int64_t update_title_time_us_;
+ int64_t distillation_time_us_;
+ int64_t distillation_size_;
DISALLOW_COPY_AND_ASSIGN(ReadingListEntry);
};

Powered by Google App Engine
This is Rietveld 408576698