New issue
Advanced search Search tips

Issue 665756 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Batch version of |selectPageForOnlineUrl|

Project Member Reported by vitaliii@chromium.org, Nov 16 2016

Issue description

In Java there is a function selectPageForOnlineUrl in OfflinePageBridge, which we are going to use in NTP UI code (e.g. CL https://codereview.chromium.org/2505763002/). Our usage involves its calls for multiple URLs in a row, so dewittj@ suggested to request a batch version. 

 

Comment 1 by dim...@chromium.org, Dec 15 2016

Labels: -Pri-3 Pri-2
Owner: dewittj@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by chili@chromium.org, Feb 17 2017

Labels: Hotlist-Fixit
Fixit clarification:

This would involve a new OfflinePageBridge function that has a signature:

OfflinePageBridge#selectPagesForOnlineUrls(
   List<String> urls,
   Callback<List<OfflinePageItem>> result)

The pages could be found by querying the offline page model for all pages that match the set of URLs, and then picking the best page for each URL.  Note that this API will not support pages that are restricted to a particular tab, but it appears that the NTP section using this API will not need those pages.
AFAIK, we (NTP) are not using selectPageForOnlineUrl explicitly anymore. I am not sure what we do now. However, I still believe that the batch version could be of use.
Ok, we are still using the function.
I just searched badly and missed it, sorry for misleading you.

So here https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsOfflineModelObserver.java?q=selectPageForOnlineUrl+file:%5Esrc/chrome/android/java/src/org/chromium/chrome/browser/suggestions/+package:%5Echromium$&l=65 we could use a batch version of the selectPageForOnlineUrl function.

Sign in to add a comment