New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 626681 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----

Blocking:
issue 611341



Sign in to add a comment

NTPUserDataLogger::ntp_url_ does not contain NTP URL

Project Member Reported by sfiera@chromium.org, Jul 8 2016

Issue description

We 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.
 
Labels: zine-16-07-11
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.

Comment 3 by nepper@chromium.org, 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

Comment 4 by sfiera@chromium.org, 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.

Comment 5 by treib@chromium.org, Jul 11 2016

Blocking: 611341
Project Member

Comment 6 by bugdroid1@chromium.org, 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

Comment 7 by sfiera@chromium.org, Jul 15 2016

Status: Fixed (was: Started)

Sign in to add a comment