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

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: 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 18d8693ea9569411890abe394647691312df7556..fb52ddeeb3491bf51585e7e60a8d06df481d5b7c 100644
--- a/components/dom_distiller/core/distiller.cc
+++ b/components/dom_distiller/core/distiller.cc
@@ -149,6 +149,10 @@ void DistillerImpl::OnPageDistillationFinished(
// The pages should be in same origin.
DCHECK_EQ(next_page_url.GetOrigin(), page_url.GetOrigin());
}
+ GURL prev_page_url(distilled_page->prev_page_url);
+ if (prev_page_url.is_valid()) {
+ DCHECK_EQ(prev_page_url.GetOrigin(), page_url.GetOrigin());
+ }
for (size_t img_num = 0; img_num < distilled_page->image_urls.size();
++img_num) {
@@ -157,6 +161,7 @@ void DistillerImpl::OnPageDistillationFinished(
FetchImage(page_num, image_id, distilled_page->image_urls[img_num]);
}
+ AddToDistillationQueue(page_num - 1, prev_page_url);
cjhopman 2014/02/15 02:45:53 nit: this could be done in the prev_page_url.is_va
shashi 2014/02/17 03:43:20 Done.
AddToDistillationQueue(page_num + 1, next_page_url);
AddPageIfDone(page_num);
DistillNextPage();
« 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