OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.distiller; | 5 package org.chromium.distiller; |
6 | 6 |
7 import java.util.ArrayList; | 7 import java.util.ArrayList; |
8 import java.util.HashSet; | 8 import java.util.HashSet; |
9 import java.util.List; | 9 import java.util.List; |
10 import java.util.Set; | 10 import java.util.Set; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 String mPagePattern = ""; | 86 String mPagePattern = ""; |
87 List<PageInfo> mAllPageInfo; | 87 List<PageInfo> mAllPageInfo; |
88 LinearFormula mFormula = null; | 88 LinearFormula mFormula = null; |
89 String mNextPagingUrl = ""; | 89 String mNextPagingUrl = ""; |
90 | 90 |
91 PageParamInfo() { | 91 PageParamInfo() { |
92 mAllPageInfo = new ArrayList<PageInfo>(); | 92 mAllPageInfo = new ArrayList<PageInfo>(); |
93 } | 93 } |
94 | 94 |
95 /** | 95 /** |
96 * @return new PageParamInfo initialized according to given parameters. | 96 * PageParamInfo initialized according to given parameters. |
97 * | 97 * |
98 * @param type must not be Type.UNSET. | 98 * @param type must not be Type.UNSET. |
99 * @param allPageInfo can be null. | 99 * @param allPageInfo can be null. |
100 * @param formula can be null. | 100 * @param formula can be null. |
101 * @param pagePattern must be non-empty string. | 101 * @param pagePattern must be non-empty string. |
102 * @param nextPagingUrl a non-empty string or "". | 102 * @param nextPagingUrl a non-empty string or "". |
103 */ | 103 */ |
104 PageParamInfo(Type type, String pagePattern, List<PageInfo> allPageInfo, Lin
earFormula formula, | 104 PageParamInfo(Type type, String pagePattern, List<PageInfo> allPageInfo, Lin
earFormula formula, |
105 String nextPagingUrl) { | 105 String nextPagingUrl) { |
106 mType = type; | 106 mType = type; |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 if (currPage.mPageNum - prevPage.mPageNum != 1) { | 475 if (currPage.mPageNum - prevPage.mPageNum != 1) { |
476 if (i != 1 && i != ascendingNumbers.size() - 1) return false; | 476 if (i != 1 && i != ascendingNumbers.size() - 1) return false; |
477 if (currPage.mUrl.isEmpty() || prevPage.mUrl.isEmpty()) return f
alse; | 477 if (currPage.mUrl.isEmpty() || prevPage.mUrl.isEmpty()) return f
alse; |
478 } | 478 } |
479 } | 479 } |
480 | 480 |
481 return true; | 481 return true; |
482 } | 482 } |
483 | 483 |
484 } | 484 } |
OLD | NEW |