Description[NTP] Fix article suggestion clicks contributing to Most Visited tiles
There's a need to distinguish clicks on different elements on the NTP:
a) clicks on Most Visited tiles.
b) clicks on (newly introduced) article suggestions (aka snippets).
The first should contribute to Most Visited tiles (i.e. boost tiles
that have been clicked in the past). The second shouldn't.
We choose to achieve this by specifying a referrer for article
suggestion clicks. This exposes the referrer to third parties, which
has been discussed and considered a desirable feature.
The fix relies on such a workaround due to the current lack of
infrastructure to propagate opaque feature-specific data from upper
layers to navigation history (and sync).
The approach competes with more intrusive/controversial alternatives to
achieve the same:
1. Use page transition types (LINK vs AUTO_BOOKMARK) to distinguish
tile clicks from article suggestion clicks: unfortunately both types
have been used in the past (older versions of Chrome).
2. Introducing a new page transition type or qualifier: this can be
considered a layering violation.
3. Introduce a dummy redirect by means of a data: schema page.
BUG=645895
Committed: https://crrev.com/30406bddaaa14549fdd5474ba0a411e5fb386f27
Cr-Commit-Position: refs/heads/master@{#419242}
Patch Set 1 #
Total comments: 15
Patch Set 2 : Addressed comments. #Patch Set 3 : Moved URL to constant. #
Total comments: 2
Patch Set 4 : Moved to HistoryTabHelper as suggested. #
Total comments: 4
Patch Set 5 : Addressed comments: new comment, arg naming. #
Total comments: 4
Patch Set 6 : Addressed comments: removed obvious comment and added docs for flag. #Patch Set 7 : Updated trivial occurrence in unit test. #Messages
Total messages: 36 (13 generated)
|