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

Unified Diff: ios/chrome/browser/dom_distiller/distiller_viewer.cc

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/dom_distiller/distiller_viewer.cc
diff --git a/ios/chrome/browser/dom_distiller/distiller_viewer.cc b/ios/chrome/browser/dom_distiller/distiller_viewer.cc
index 0ff0cdb93f7675a0eb805cfb6a4bae647ca361cd..ef2977896eef448bb601aed485bec5ad053733e4 100644
--- a/ios/chrome/browser/dom_distiller/distiller_viewer.cc
+++ b/ios/chrome/browser/dom_distiller/distiller_viewer.cc
@@ -22,15 +22,16 @@ DistillerViewer::DistillerViewer(
PrefService* prefs,
const GURL& url,
const DistillationFinishedCallback& callback,
- const DistillerPageFactory* factory)
+ std::unique_ptr<dom_distiller::DistillerPage> page)
: DistillerViewerInterface(distillerService, prefs),
url_(url),
callback_(callback) {
DCHECK(distillerService);
DCHECK(url.is_valid());
- std::unique_ptr<DistillerPage> page =
- factory ? factory->CreateDistillerPage(gfx::Size())
- : distillerService->CreateDefaultDistillerPage(gfx::Size());
+ if (!page) {
+ page = distillerService->CreateDefaultDistillerPage(gfx::Size());
+ }
+
std::unique_ptr<ViewerHandle> viewer_handle =
distillerService->ViewUrl(this, std::move(page), url);
« no previous file with comments | « ios/chrome/browser/dom_distiller/distiller_viewer.h ('k') | ios/chrome/browser/reading_list/reading_list_distiller_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698