Description[Popular Sites] Fix loading latency noticeable on iOS (again)
Cached Popular Sites are now read synchronously (via tiles()) instead
of waiting for the callback. The callback is expected to be almost
immediate, but it turns out that the latency is easily noticeable on
iOS.
Since we have cached and parsed JSON, the list of sites can be built
before returning from StartFetch (now renamed to MaybeStartFetch())
and hence MostVisitedSites is able to expose PopularSites in its
first notification to observers.
The fix has been verified on an iOS device.
BUG=662397
Review-Url: https://codereview.chromium.org/2659633002
Cr-Commit-Position: refs/heads/master@{#446736}
Committed: https://chromium.googlesource.com/chromium/src/+/fd2c7ab348ff8ec60fe8609410da9cc02a769402
Patch Set 1 #
Total comments: 4
Patch Set 2 : Rename to MaybeStartFetch. #Patch Set 3 : Rename to MaybeStartFetch. #Patch Set 4 : Minor fixes. #Patch Set 5 : Addressed comments. #
Total comments: 15
Patch Set 6 : Fix tests. #
Total comments: 4
Patch Set 7 : Use nullopt. #Patch Set 8 : Improve comment. #Patch Set 9 : Revert usage of MockCallback. #
Total comments: 4
Patch Set 10 : Rebased. #Patch Set 11 : Address comments. #Messages
Total messages: 31 (18 generated)
|