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

Unified Diff: components/dom_distiller/standalone/content_extractor.cc

Issue 678543002: add pagination info to DistilledPageProto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 | « components/dom_distiller/core/proto/distilled_page.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/standalone/content_extractor.cc
diff --git a/components/dom_distiller/standalone/content_extractor.cc b/components/dom_distiller/standalone/content_extractor.cc
index 150fd3196dc28134aeaa34ca76fa58ba655ee22b..b6a5a4e98995f031a480efbf158ac52d48a2b8c7 100644
--- a/components/dom_distiller/standalone/content_extractor.cc
+++ b/components/dom_distiller/standalone/content_extractor.cc
@@ -138,12 +138,23 @@ std::string GetReadableArticleString(
output << "Article Title: " << article_proto.title() << std::endl;
output << "# of pages: " << article_proto.pages_size() << std::endl;
for (int i = 0; i < article_proto.pages_size(); ++i) {
+ if (i > 0) output << std::endl;
const DistilledPageProto& page = article_proto.pages(i);
output << "Page " << i << std::endl;
output << "URL: " << page.url() << std::endl;
output << "Content: " << page.html() << std::endl;
if (page.has_debug_info() && page.debug_info().has_log())
output << "Log: " << page.debug_info().log() << std::endl;
+ if (page.has_pagination_info()) {
+ if (page.pagination_info().has_next_page()) {
+ output << "Next Page: " << page.pagination_info().next_page()
+ << std::endl;
+ }
+ if (page.pagination_info().has_prev_page()) {
+ output << "Prev Page: " << page.pagination_info().prev_page()
+ << std::endl;
+ }
+ }
}
return output.str();
}
« no previous file with comments | « components/dom_distiller/core/proto/distilled_page.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698