[Local NTP] Figure out caching for OGB |
|||||
Issue descriptionCurrently, 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.
,
Jul 20 2017
,
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
,
Aug 21 2017
,
Nov 15 2017
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.
,
Aug 15
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by treib@chromium.org
, Jul 14 2017