New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 768794 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Windows , iOS
Pri: 3
Type: Bug



Sign in to add a comment

Chrome Home can display stale MostVisited tiles

Project Member Reported by mastiz@chromium.org, Sep 26 2017

Issue description

The Java code for Chrome Home instantiates MostVisitedSitesBridge just once and reuses the object later on. This means Most Visited tiles are never updated (e.g. after user having typed a URL in the omnibox).

As dgn@ and bauerb@ pointed out, ntpAdapter#refreshSuggestions should probably call MostVisitedSites::Refresh(), which mimics the behavior of the NTP because Refresh() is also called during construction (more precisely, during SetMostVisitedURLsObserver().

On java-land, there's no such API as Refresh(), but MostVisitedSites's setObserver() has the same side effect (subtle!). I suspect Chrome Home registers the observers just once, we should verify.
 
Labels: zine-triaged
Status: Started (was: Assigned)
Components: UI>Browser>ContentSuggestions
Update: LOG() messages in MostVisitedSites::Refresh and MostVisitedSites::SetMostVisitedURLsObserver are triggered every time ChromeHome is pulled up.

The only path I could find for these updates is TileGroup::startObserving which is used in SiteSection and therefore NTPAdapter and NTPView.
Is it possible that the lifespan of one of these objects is shorter than we would like?

I exposed the MostVisited::Refresh method via MVBridge and included it in the NTPAdapter. This caused this log pattern whenever the sheet was pulled up:

MostVisitedSites::SetObserver
MostVisitedSites::OnMostVisitedURLsAvailable
MostVisitedSites::Refresh
MostVisitedSites::Refresh

--> no further OnMostVisitedURLsAvailable as sites haven't changed after SetObserver.

WIP CL here: http://crrev.com/c/692855


In other words: the tiles are always one cycle late but never stale for long.
Bernhard & Nicolas, can you help me understand why SetObserver is called so frequently?
Labels: M-64
Adding milestone and pinging the open question.

Comment 6 by dgn@chromium.org, Oct 20 2017

MostVisitedURLsObserver is registered and listening for changes. So if the backend decides to notify the UI of a change, it will be picked up. It can be seen via transitions from the baked in tiles to the personalised ones on startup.

So I'm missing the issue there. Is it that the native code does not have signal to fetch new data and push it to the UI?

Comment 7 by dgn@chromium.org, Oct 20 2017

Ah right I get it. When the bottom sheet is closed, we kill the Zine UI. This is a change bauerb@ made some time ago. So I'd say it's WAI.
Labels: -Pri-1 OS-iOS OS-Windows Pri-3
Ok, so everything works but refreshing is still more a side-effect of a setter than something we consciously do.
I just looked where we rely on that and the answer is: Everywhere (Win, iOS, tests).

Therefore, I will leave this open (& reprioritize) as refactoring/cleanup until we require every caller to call Refresh explicitly.
Labels: -M-64 M-66
Labels: -M-66 zine-maintenance
Owner: ----
Status: Available (was: Started)
Applying zine-maintenance label so new owners can decide whether this refactoring is still worth picking up.
Status: WontFix (was: Available)
Chrome Home is no longer under experimentation.

Sign in to add a comment