Fix tile impression counting issue on NTP
This CL fixes a couple issues on counting tile impressions on NTP. 1. NTP calls TileManager::GetTiles() to get both the top and sub tiles. While Omnibox makes two separate calls of GetTiles() and GetTile(). This CL fixes the behavior of NTP to match that of Omnibox, so we can count top level tile impression when GetTiles() is called, and counts subtile impression when GetTile() is called. 2. Clicking the home button will often invoke 2 calls to GetTiles(). One caused by QueryTileSection ctor, one caused by OnLoadUrl() for NTP. We don't actually need to reload tiles if user never clicked on any tiles. In most cases, only the call from ctor is necessary. This CL fixes the issue by checking whether tiles has been clicked before reloading all tiles. BUG=1155919 Change-Id: Ief1f4be957d160119c40fec1da71ae79d6258321 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2576504 Commit-Queue: Min Qin <qinmin@chromium.org> Reviewed-by:Shakti Sahu <shaktisahu@chromium.org> Cr-Commit-Position: refs/heads/master@{#836218}
Showing
Please register or sign in to comment