Choose an appropriate URL substring to bind suggestions to. |
|||
Issue descriptionCurrently we generate contextual suggestions for the webpage plain URL. However, the URL might change as the user is scrolling down the page. We want to chose an appropriate substring to generate suggestions for. Maybe cut off everything after the # sign.
,
Jul 20 2017
,
Sep 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dbe1a9621011e05c39f4e78fda6793dcc464f827 commit dbe1a9621011e05c39f4e78fda6793dcc464f827 Author: galinap <galinap@google.com> Date: Wed Sep 13 14:29:20 2017 [Contextual Suggestions] Use a clean url for contextual suggestion fetch Before sending a fetch request for suggestions for the current context to the native side, we want to check if the current URL is valid. If there is no active tab (which is the case when all tabs are dismissed), we clear the suggestions. If the URL is not a HTTP or a HTTP URL, we clear the suggestions. We also want to make sure that we don't initiate a fetch when the carousel already has suggestions for the current context. To do this, we compare if the new URL and the old URL are the same excluding the fragments. In all these cases we don't send a request to the native side. Otherwise, if the URL is a new network URL, we send a request to the backend. Bug: 745660 Change-Id: Iab7680e8e704f3de6fb4ed88be9e26c0fda3deca Reviewed-on: https://chromium-review.googlesource.com/646326 Commit-Queue: Galia Peycheva <galinap@google.com> Reviewed-by: Andre Gaschler <gaschler@chromium.org> Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org> Cr-Commit-Position: refs/heads/master@{#501627} [modify] https://crrev.com/dbe1a9621011e05c39f4e78fda6793dcc464f827/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsCarousel.java
,
Sep 13 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by sheriffbot@chromium.org
, Jul 18 2017