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

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

Issue 2647763005: Store the distilled_url in Reading List entry in Reading List on iOS. (Closed)
Patch Set: feedback Created 3 years, 11 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 17651cbed342c46a969f21ceb44853f27b79f761..6cb2716ebc60644fb168846a9095ea80fb6565ae 100644
--- a/components/reading_list/ios/reading_list_entry.h
+++ b/components/reading_list/ios/reading_list_entry.h
@@ -59,6 +59,8 @@ class ReadingListEntry {
// The local file path for the distilled version of the page. This should only
// be called if the state is "PROCESSED".
const base::FilePath& DistilledPath() const;
+ // The URL that has been distilled to produce file stored at |DistilledPath|.
+ const GURL& DistilledURL() 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;
@@ -124,9 +126,9 @@ class ReadingListEntry {
// Sets the title.
void SetTitle(const std::string& title);
- // Sets the distilled URL and switch the state to PROCESSED and reset the time
- // until the next try.
- void SetDistilledPath(const base::FilePath& path);
+ // 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 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.
@@ -143,12 +145,14 @@ class ReadingListEntry {
int64_t update_title_time,
ReadingListEntry::DistillationState distilled_state,
const base::FilePath& distilled_path,
+ const GURL& distilled_url,
int failed_download_counter,
std::unique_ptr<net::BackoffEntry> backoff);
GURL url_;
std::string title_;
State state_;
base::FilePath distilled_path_;
+ GURL distilled_url_;
DistillationState distilled_state_;
std::unique_ptr<net::BackoffEntry> backoff_;
« no previous file with comments | « components/reading_list/ios/proto/reading_list.proto ('k') | components/reading_list/ios/reading_list_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698