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

Unified Diff: components/dom_distiller/core/distiller.cc

Issue 167963003: Support for distilling prior pages in an article. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « no previous file | components/dom_distiller/core/distiller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/distiller.cc
diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
index 9bd8ba22b0e0c9ffee0bfaa3297a3c7e207730a7..8bdc905a8231236647c96882d3c8638e0dec2641 100644
--- a/components/dom_distiller/core/distiller.cc
+++ b/components/dom_distiller/core/distiller.cc
@@ -151,6 +151,12 @@ void DistillerImpl::OnPageDistillationFinished(
AddToDistillationQueue(page_num + 1, next_page_url);
}
+ GURL prev_page_url(distilled_page->prev_page_url);
+ if (prev_page_url.is_valid()) {
+ DCHECK_EQ(prev_page_url.GetOrigin(), page_url.GetOrigin());
+ AddToDistillationQueue(page_num - 1, prev_page_url);
+ }
+
for (size_t img_num = 0; img_num < distilled_page->image_urls.size();
++img_num) {
std::string image_id =
« no previous file with comments | « no previous file | components/dom_distiller/core/distiller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698