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

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

Issue 678543002: add pagination info to DistilledPageProto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: components/dom_distiller/core/distiller.cc
diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
index f4cdabfa322aa9d866609a1bb8955247f3de66af..f54e24cb8b272dabff5d19e9d4c4c6a3bd95f525 100644
--- a/components/dom_distiller/core/distiller.cc
+++ b/components/dom_distiller/core/distiller.cc
@@ -170,6 +170,8 @@ void DistillerImpl::OnPageDistillationFinished(
// The pages should be in same origin.
DCHECK_EQ(next_page_url.GetOrigin(), page_url.GetOrigin());
AddToDistillationQueue(page_num + 1, next_page_url);
+ page_data->distilled_page_proto->data.mutable_pagination_info()->
+ set_next_page(next_page_url.spec());
}
}
@@ -178,6 +180,8 @@ void DistillerImpl::OnPageDistillationFinished(
if (prev_page_url.is_valid()) {
DCHECK_EQ(prev_page_url.GetOrigin(), page_url.GetOrigin());
AddToDistillationQueue(page_num - 1, prev_page_url);
+ page_data->distilled_page_proto->data.mutable_pagination_info()->
nyquist 2014/10/24 20:04:02 Since you added canonical_page to the DistilledPag
kuan 2014/10/24 20:57:32 Done. no reason, except that it's not used, but i
+ set_prev_page(prev_page_url.spec());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698