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

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

Issue 2604773002: Create distiller files for Reading List. (Closed)
Patch Set: feedback Created 3 years, 12 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.cc
diff --git a/ios/chrome/browser/reading_list/url_downloader.cc b/ios/chrome/browser/reading_list/url_downloader.cc
index 6be56c989c286b1f2e5a9e5c12cab5efa7c59de9..096e5c97f824d4e6c9c709a758dbf3fdfe08aaf5 100644
--- a/ios/chrome/browser/reading_list/url_downloader.cc
+++ b/ios/chrome/browser/reading_list/url_downloader.cc
@@ -14,6 +14,7 @@
#include "components/reading_list/ios/offline_url_utils.h"
#include "ios/chrome/browser/chrome_paths.h"
#include "ios/chrome/browser/dom_distiller/distiller_viewer.h"
+#include "ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h"
#include "ios/web/public/web_thread.h"
#include "net/base/escape.h"
#include "url/gurl.h"
@@ -22,11 +23,13 @@
URLDownloader::URLDownloader(
dom_distiller::DomDistillerService* distiller_service,
+ reading_list::ReadingListDistillerPageFactory* distiller_page_factory,
PrefService* prefs,
base::FilePath chrome_profile_path,
const DownloadCompletion& download_completion,
const SuccessCompletion& delete_completion)
: distiller_service_(distiller_service),
+ distiller_page_factory_(distiller_page_factory),
pref_service_(prefs),
download_completion_(download_completion),
delete_completion_(delete_completion),
@@ -142,7 +145,8 @@ void URLDownloader::DownloadURL(GURL url, bool offline_url_exists) {
distiller_.reset(new dom_distiller::DistillerViewer(
distiller_service_, pref_service_, url,
- base::Bind(&URLDownloader::DistillerCallback, base::Unretained(this))));
+ base::Bind(&URLDownloader::DistillerCallback, base::Unretained(this)),
+ distiller_page_factory_));
}
void URLDownloader::DistillerCallback(
« no previous file with comments | « ios/chrome/browser/reading_list/url_downloader.h ('k') | ios/chrome/browser/reading_list/url_downloader_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698