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

Issue 742937 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Feature



Sign in to add a comment

[Local NTP] Figure out caching for OGB

Project Member Reported by treib@chromium.org, Jul 14 2017

Issue description

Currently, OneGoogleBarService caches the OGB data, and clears it when the sign-in state changes or when it receives an invalid response from the server. However, this doesn't catch all cases when something changes, e.g. customizations in the app drawer, and possibly some other things (changes to the account picture? OTOH, those seem to propagate very slowly anyway).

The effect is that these changes arrive one NTP delayed: After changing something, the next NTP will have the old state, and only the second NTP gets the new state. We need to either
- figure out when exactly the cache needs to be cleared, or
- turn off caching, or
- decide we're okay with the delayed updates (i.e. the faster response is worth
  the rare cases when we get it wrong.
 

Comment 1 by treib@chromium.org, Jul 14 2017

Summary: [Local NTP] Figure out caching for OGB (was: [Local NTP} Figure out caching for OGB)

Comment 2 by fi...@chromium.org, Jul 20 2017

Labels: -Type-Bug M-62 zine-triaged Type-Feature
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3b58c86b9181a5cc3690e05f38ee3160c1e912c

commit c3b58c86b9181a5cc3690e05f38ee3160c1e912c
Author: Marc Treib <treib@chromium.org>
Date: Tue Aug 01 12:56:58 2017

OneGoogleBar on local NTP: wait for response before using cached data

It's not always safe to use cached data for the OneGoogleBar. For now,
always wait for the network request to come back before serving the OGB.
This is similar to the behavior of the remote NTP.
This also allows us to simplify the observer interface a bit.
Note that if the network request fails due to a transient error, the
cached data is still used.

Bug:  742937 
Change-Id: Iadd2e72bfe06265d006629719c4792b2aefd15ec
Reviewed-on: https://chromium-review.googlesource.com/593909
Reviewed-by: Chris Pickel <sfiera@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490954}
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/local_ntp_source.cc
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/local_ntp_source.h
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/one_google_bar/one_google_bar_service.cc
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/one_google_bar/one_google_bar_service.h
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/one_google_bar/one_google_bar_service_observer.h
[modify] https://crrev.com/c3b58c86b9181a5cc3690e05f38ee3160c1e912c/chrome/browser/search/one_google_bar/one_google_bar_service_unittest.cc

Comment 4 by treib@chromium.org, Aug 21 2017

Labels: -Pri-2 -M-62 Pri-3

Comment 5 by treib@chromium.org, Nov 15 2017

Status: Fixed (was: Started)
Let's call this good enough until we actually discover some problem with the current approach, since I don't have concrete ideas or plans to change anything here.
Labels: NTPOGB

Sign in to add a comment