| Index: java/org/chromium/distiller/MonotonicPageInfosGroups.java
|
| diff --git a/java/org/chromium/distiller/MonotonicPageInfosGroups.java b/java/org/chromium/distiller/MonotonicPageInfosGroups.java
|
| index f2be969c6e23c00ba629b8f77d5b05e1f2cdc700..01470d0502181a10624e038b592f1e88121d50a4 100644
|
| --- a/java/org/chromium/distiller/MonotonicPageInfosGroups.java
|
| +++ b/java/org/chromium/distiller/MonotonicPageInfosGroups.java
|
| @@ -37,13 +37,11 @@ class MonotonicPageInfosGroups {
|
| }
|
|
|
| /**
|
| - * Add a PageParamInfo.PageInfo for the given page number and URL, ensuring the group stays
|
| - * monotonic:
|
| + * Add the given PageParamInfo.PageInfo, ensuring the group stays monotonic:
|
| * - add in the current group if the page number is strictly increasing or decreasing
|
| * - otherwise, start a new group.
|
| */
|
| - void addNumber(int number, String url) {
|
| - PageParamInfo.PageInfo pageInfo = new PageParamInfo.PageInfo(number, url);
|
| + void addPageInfo(PageParamInfo.PageInfo pageInfo) {
|
| Group group = getLastGroup();
|
| if (group.mList.isEmpty()) {
|
| group.mList.add(pageInfo);
|
| @@ -74,6 +72,14 @@ class MonotonicPageInfosGroups {
|
| group.mDeltaSign = deltaSign;
|
| }
|
|
|
| + /**
|
| + * Add a PageParamInfo.PageInfo for the given page number and URL, ensuring the group stays
|
| + * monotonic.
|
| + */
|
| + void addNumber(int number, String url) {
|
| + addPageInfo(new PageParamInfo.PageInfo(number, url));
|
| + }
|
| +
|
| void cleanup() {
|
| // Remove last empty adjacent number group.
|
| if (!mGroups.isEmpty() && getLastGroup().mList.isEmpty()) {
|
|
|