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

Unified Diff: java/org/chromium/distiller/PageLinkInfo.java

Issue 1029593003: implement validations of pagination URLs (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: addr all comments Created 5 years, 8 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: java/org/chromium/distiller/PageLinkInfo.java
diff --git a/java/org/chromium/distiller/PageLinkInfo.java b/java/org/chromium/distiller/PageLinkInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..11f98d87885dcbe5b83fa8d378806541f294b974
--- /dev/null
+++ b/java/org/chromium/distiller/PageLinkInfo.java
@@ -0,0 +1,25 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.distiller;
+
+/**
+ * This class stores information about the link (anchor) after PageParameterDetector has detected
+ * the page parameter:
+ * - the page number (as represented by the original plain text) for the link
+ * - the original page parameter numeric component in the URL (this component would be replaced
+ * by PageParameterDetector.PAGE_PARAM_PLACEHOLDER in the URL pattern)
+ * - the position of this link in the list of ascending numbers.
+ */
+class PageLinkInfo {
+ int mPageNum;
+ int mPageParamValue;
+ int mPosInAscendingList;
cjhopman 2015/04/22 00:35:35 Does a PageLinkInfo always correspond to a PagePar
kuan 2015/04/22 13:39:38 no it doesn't. 1) a PageParamInfo.PageInfo can hav
+
+ PageLinkInfo(int pageNum, int pageParamValue, int posInAscendingList) {
+ mPageNum = pageNum;
+ mPageParamValue = pageParamValue;
+ mPosInAscendingList = posInAscendingList;
+ }
+}
« no previous file with comments | « no previous file | java/org/chromium/distiller/PageParamInfo.java » ('j') | java/org/chromium/distiller/PageParamInfo.java » ('J')

Powered by Google App Engine
This is Rietveld 408576698