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

Unified Diff: ios/chrome/browser/reading_list/url_downloader.h

Issue 2650593003: Store distilled URL during distillation in Reading List on iOS (Closed)
Patch Set: 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: ios/chrome/browser/reading_list/url_downloader.h
diff --git a/ios/chrome/browser/reading_list/url_downloader.h b/ios/chrome/browser/reading_list/url_downloader.h
index 3ed0dc7426311a806220b7043c1782a18a9cfb2c..88dbe9f2c542b8447aebdb36c4094695db135ed5 100644
--- a/ios/chrome/browser/reading_list/url_downloader.h
+++ b/ios/chrome/browser/reading_list/url_downloader.h
@@ -48,12 +48,14 @@ class URLDownloader {
using SuccessCompletion = base::Callback<void(const GURL&, bool)>;
// A download completion callback that takes, in order, the GURL that was
- // downloaded, a SuccessState indicating the outcome of the download, the
- // path to the downloaded page (relative to |OfflineRootDirectoryPath()|, and
- // the title of the url, and returns void.
- // The path to downloaded file and title should not be used in case of
+ // downloaded, the GURL of the page that was downloaded after redirections, a
+ // SuccessState indicating the outcome of the download, the path to the
+ // downloaded page (relative to |OfflineRootDirectoryPath()|, and the title of
+ // the url, and returns void.
+ // The path to downloaded file and title should not be used in case of
// failure.
using DownloadCompletion = base::Callback<void(const GURL&,
+ const GURL&,
SuccessState,
const base::FilePath&,
const std::string&)>;
@@ -131,6 +133,9 @@ class URLDownloader {
images,
const std::string& title);
+ // A callback called if the URL passed to the distilled led to a redirection.
+ void RedirectionCallback(const GURL& page_url, const GURL& redirected_url);
+
dom_distiller::DomDistillerService* distiller_service_;
reading_list::ReadingListDistillerPageFactory* distiller_page_factory_;
PrefService* pref_service_;
@@ -139,6 +144,8 @@ class URLDownloader {
std::deque<Task> tasks_;
bool working_;
base::FilePath base_directory_;
+ GURL original_url_;
+ GURL distilled_url_;
std::unique_ptr<dom_distiller::DistillerViewerInterface> distiller_;
base::CancelableTaskTracker task_tracker_;
« no previous file with comments | « ios/chrome/browser/reading_list/reading_list_download_service.cc ('k') | ios/chrome/browser/reading_list/url_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698