Commit 8c65d84c authored by Theresa's avatar Theresa Committed by Commit Bot

[EoC] Don't record NTP UMA for suggestions navigations

Don't record a histogram entry for NewTabPage.ActionAndroid2 or the
Suggestions.Card.Tapped user action when a contextual suggestion
is clicked.

BUG=870424

Change-Id: I7d10c1b00628c83f4dbde2a4353707a483722656
Reviewed-on: https://chromium-review.googlesource.com/1162319Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580641}
parent 99541e5c
...@@ -82,7 +82,7 @@ public class SnippetArticleViewHolder extends CardViewHolder { ...@@ -82,7 +82,7 @@ public class SnippetArticleViewHolder extends CardViewHolder {
@Override @Override
public void onCardTapped() { public void onCardTapped() {
SuggestionsMetrics.recordCardTapped(); if (!mArticle.isContextual()) SuggestionsMetrics.recordCardTapped();
int windowDisposition = WindowOpenDisposition.CURRENT_TAB; int windowDisposition = WindowOpenDisposition.CURRENT_TAB;
mUiDelegate.getEventReporter().onSuggestionOpened( mUiDelegate.getEventReporter().onSuggestionOpened(
mArticle, windowDisposition, mUiDelegate.getSuggestionsRanker()); mArticle, windowDisposition, mUiDelegate.getSuggestionsRanker());
......
...@@ -105,7 +105,9 @@ public class SuggestionsNavigationDelegateImpl implements SuggestionsNavigationD ...@@ -105,7 +105,9 @@ public class SuggestionsNavigationDelegateImpl implements SuggestionsNavigationD
@Override @Override
public void openSnippet(final int windowOpenDisposition, final SnippetArticle article) { public void openSnippet(final int windowOpenDisposition, final SnippetArticle article) {
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_SNIPPET); if (!article.isContextual()) {
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_SNIPPET);
}
if (article.isAssetDownload()) { if (article.isAssetDownload()) {
assert windowOpenDisposition == WindowOpenDisposition.CURRENT_TAB assert windowOpenDisposition == WindowOpenDisposition.CURRENT_TAB
...@@ -157,7 +159,9 @@ public class SuggestionsNavigationDelegateImpl implements SuggestionsNavigationD ...@@ -157,7 +159,9 @@ public class SuggestionsNavigationDelegateImpl implements SuggestionsNavigationD
} }
Tab loadingTab = openUrl(windowOpenDisposition, loadUrlParams); Tab loadingTab = openUrl(windowOpenDisposition, loadUrlParams);
if (loadingTab != null) SuggestionsMetrics.recordVisit(loadingTab, article); if (loadingTab != null && !article.isContextual()) {
SuggestionsMetrics.recordVisit(loadingTab, article);
}
} }
private void openDownloadSuggestion( private void openDownloadSuggestion(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment