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

Issue 1029593003: implement validations of pagination URLs (Closed)

Created:
5 years, 9 months ago by kuan
Modified:
5 years, 8 months ago
Reviewers:
cjhopman
Base URL:
https://github.com/chromium/dom-distiller.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

implement validations of pagination URLs This is the 2nd part of the new pagination algorithm implementation: various validations of potential pagination URLs. * PageParameterDetector: - declares PagePattern interface that page pattern handlers must implement - calls PagePattern methods to validate patterns and check for paging URL - moves LinkInfo out to its own class PageLinkInfo, to avoid cross-access by PageParamInfo * QueryParamPagePattern - handles page parameter in the query of potential pagination URLs - implements PageParameterDetector.PagePattern interface - add tests. * PathComponentPagePattern - handles page parameter in the path of potential pagination URLs - implements PageParameterDetector.PagePattern interface - add tests. * PageParamInfo - if possible, generates linear formula between text and page param of each pagination anchor - checks if page numbers of potential pagination URLs are adjacent and consecutive, and if they form a page sequence. - add tests. BUG=464143 R=cjhopman@chromium.org Committed: 10bc28cd4169e3b9532b5c253f620893c7650a67

Patch Set 1 #

Patch Set 2 : rename test #

Total comments: 26

Patch Set 3 : addr chris's comments #

Patch Set 4 : nit #

Total comments: 38

Patch Set 5 : addr all comments #

Patch Set 6 : nit in comment #

Patch Set 7 : copyright 2014 -> 2016 #

Patch Set 8 : copyright 2016 -> 2015 #

Patch Set 9 : copyright 2016 -> 2015 #

Total comments: 14

Patch Set 10 : addr all comments #

Total comments: 10

Patch Set 11 : addr chris's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1230 lines, -180 lines) Patch
A java/org/chromium/distiller/PageLinkInfo.java View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download
M java/org/chromium/distiller/PageParamInfo.java View 1 2 3 4 5 6 7 8 9 10 5 chunks +279 lines, -16 lines 0 comments Download
M java/org/chromium/distiller/PageParameterDetector.java View 1 2 3 4 5 6 7 8 9 8 chunks +84 lines, -102 lines 0 comments Download
M java/org/chromium/distiller/ParsedUrl.java View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A java/org/chromium/distiller/PathComponentPagePattern.java View 1 2 3 4 5 6 7 8 9 1 chunk +349 lines, -0 lines 0 comments Download
A java/org/chromium/distiller/QueryParamPagePattern.java View 1 2 3 4 5 6 7 8 9 1 chunk +167 lines, -0 lines 0 comments Download
A javatests/org/chromium/distiller/PageParamInfoTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +97 lines, -0 lines 0 comments Download
M javatests/org/chromium/distiller/PageParameterDetectorTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -60 lines 0 comments Download
M javatests/org/chromium/distiller/ParsedUrlTest.java View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A javatests/org/chromium/distiller/PathComponentPagePatternTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +151 lines, -0 lines 0 comments Download
A javatests/org/chromium/distiller/QueryParamPagePatternTest.java View 1 2 3 4 5 6 7 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (1 generated)
kuan
5 years, 9 months ago (2015-03-23 16:58:26 UTC) #2
cjhopman
Higher level: I think this would be easier to follow if we had a PagePattern ...
5 years, 9 months ago (2015-03-27 00:16:12 UTC) #3
cjhopman
https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java File java/org/chromium/distiller/PageParameterDetector.java (right): https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java#newcode241 java/org/chromium/distiller/PageParameterDetector.java:241: for (int i = 0, j = 0; i ...
5 years, 9 months ago (2015-03-27 00:18:21 UTC) #4
kuan
i've addressed all comments in patch set 3 (set 4 is just nits). ptal. thx. ...
5 years, 8 months ago (2015-03-31 17:17:51 UTC) #5
cjhopman
https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java File java/org/chromium/distiller/PageParameterDetector.java (right): https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java#newcode241 java/org/chromium/distiller/PageParameterDetector.java:241: for (int i = 0, j = 0; i ...
5 years, 8 months ago (2015-04-07 00:45:49 UTC) #6
kuan
i've addressed all comments in patch set 5, the later sets r just nits in ...
5 years, 8 months ago (2015-04-10 22:41:28 UTC) #7
kuan
chris, pls hold off on the review. let me look more into the linear formula ...
5 years, 8 months ago (2015-04-11 14:21:08 UTC) #8
kuan
ok, this is now ready for review. thx! https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java File java/org/chromium/distiller/PageParameterDetector.java (right): https://codereview.chromium.org/1029593003/diff/20001/java/org/chromium/distiller/PageParameterDetector.java#newcode508 java/org/chromium/distiller/PageParameterDetector.java:508: * ...
5 years, 8 months ago (2015-04-13 17:21:38 UTC) #9
cjhopman
https://codereview.chromium.org/1029593003/diff/150001/java/org/chromium/distiller/PageParameterDetector.java File java/org/chromium/distiller/PageParameterDetector.java (right): https://codereview.chromium.org/1029593003/diff/150001/java/org/chromium/distiller/PageParameterDetector.java#newcode236 java/org/chromium/distiller/PageParameterDetector.java:236: private static PageParamInfo getPageParamInfo(PagePattern pagePattern, I feel like we ...
5 years, 8 months ago (2015-04-16 21:58:32 UTC) #10
kuan
i've addressed all comments in patch set 10. as per our 1-1 last wk, i've ...
5 years, 8 months ago (2015-04-20 23:11:13 UTC) #11
cjhopman
https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageLinkInfo.java File java/org/chromium/distiller/PageLinkInfo.java (right): https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageLinkInfo.java#newcode18 java/org/chromium/distiller/PageLinkInfo.java:18: int mPosInAscendingList; Does a PageLinkInfo always correspond to a ...
5 years, 8 months ago (2015-04-22 00:35:35 UTC) #12
kuan
https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageLinkInfo.java File java/org/chromium/distiller/PageLinkInfo.java (right): https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageLinkInfo.java#newcode18 java/org/chromium/distiller/PageLinkInfo.java:18: int mPosInAscendingList; On 2015/04/22 00:35:35, cjhopman wrote: > Does ...
5 years, 8 months ago (2015-04-22 13:39:38 UTC) #13
cjhopman
https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageParamInfo.java File java/org/chromium/distiller/PageParamInfo.java (right): https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageParamInfo.java#newcode23 java/org/chromium/distiller/PageParamInfo.java:23: static final int PAGE_NUM_ADJACENT_MASK = 1 << 0; can ...
5 years, 8 months ago (2015-04-24 02:38:56 UTC) #14
kuan
i've addressed all comments in patch set 11. ptal. thx. https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageParamInfo.java File java/org/chromium/distiller/PageParamInfo.java (right): https://codereview.chromium.org/1029593003/diff/170001/java/org/chromium/distiller/PageParamInfo.java#newcode23 ...
5 years, 8 months ago (2015-04-24 17:38:00 UTC) #15
cjhopman
lgtm
5 years, 8 months ago (2015-04-27 18:14:29 UTC) #16
kuan
5 years, 8 months ago (2015-04-27 18:23:30 UTC) #17
Message was sent while issue was closed.
Committed patchset #11 (id:190001) manually as
10bc28cd4169e3b9532b5c253f620893c7650a67 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698