NTPUserDataLogger::ntp_url_ does not contain NTP URL |
|||
Issue descriptionWe use ntp_url_ to detect when a user navigates away from the NTP, and would like to use it to detect when someone navigates back. However, it doesn't actually contain the NTP's url. It's updated whenever NTPUserDataLogger::GetOrCreateFromWebContents() is called, which apparently can happen on non-NTP pages as well. Investigating.
,
Jul 8 2016
This is coming in through SearchTabHelper::MostVisitedItemsChanged(). If TopSites changes (say, as a result of clicking a link on the NTP), then we will tell the NTP to dump stats, even through we're not on an NTP.
,
Jul 11 2016
Hi Chris, I'm not sure about the impact of your observation. Can you help me understand what the impact of this issue is? Thanks Patrick
,
Jul 11 2016
Right now the stats code does not make sense. One of the things that makes it difficult is that there are calls to log stats peppered about the code base and it's hard to say which one will actually do it (only one will). An improvement I'm trying to make is to make it predictable when stats will be logged, and one of the cases when we would need to log stats is when the user leaves the NTP. However, knowing when the user is leaving the NTP is difficult when the URL recorded for the NTP might be some random other page. I don't *know* of any problem that is caused by this bug, but also can't assert with any confidence that there aren't any.
,
Jul 11 2016
,
Jul 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/61b6eba8e654d433215a148f03f7eeac708c73ab commit 61b6eba8e654d433215a148f03f7eeac708c73ab Author: sfiera <sfiera@chromium.org> Date: Fri Jul 15 13:12:28 2016 Record impressions/navigations only once per tile. Track when we have logged an impression or navigation for a tile, then ignore it if we are asked to log an additional one for the same tile. If we detect that the user has returned to the NTP after navigating away, reset the tracker (and has_emitted_) so that we can collect stats again. BUG= 625163 , 626681 Review-Url: https://codereview.chromium.org/2124903003 Cr-Commit-Position: refs/heads/master@{#405751} [modify] https://crrev.com/61b6eba8e654d433215a148f03f7eeac708c73ab/chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc [modify] https://crrev.com/61b6eba8e654d433215a148f03f7eeac708c73ab/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h [modify] https://crrev.com/61b6eba8e654d433215a148f03f7eeac708c73ab/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc
,
Jul 15 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by sfiera@chromium.org
, Jul 8 2016