[omnibox] Reland: Use a counter instead of a bit to detect stale results
ZeroSuggestProvider::OnMostVisitedUrlsAvailable() can be called back multiple times asynchronously from the respective ::Start() calls. (TopSites::GetMostVisitedURLs() will happily queue up infinite requests.) Currently there's only a single state variable protecting against late replies. This change adds a counter to remember the last valid request, and adds a test to challenge it. It also cleans up the inconsistent scoping of the enumerations. This reland initializes the counter in question, to pass MSAN, even though it isn't strictly important which value it starts with. Change-Id: Ie43feffd25c83319e04fc17b32d87e4037a6e7a3 Reviewed-on: https://chromium-review.googlesource.com/973185Reviewed-by:Justin Donnelly <jdonnelly@chromium.org> Commit-Queue: Kevin Bailey <krb@chromium.org> Cr-Commit-Position: refs/heads/master@{#544882}
Showing
Please register or sign in to comment