Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsMetricsReporter.java

Issue 2618893003: 📰 Tweak the suggestion ranks for UMA to handle fetchMore (Closed)
Patch Set: rebase, address comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.suggestions;
6
7 import org.chromium.chrome.browser.ntp.cards.ActionItem;
8 import org.chromium.chrome.browser.ntp.snippets.CategoryInt;
9 import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
10
11 /**
12 * Exposes UMA related methods.
13 */
14 public interface SuggestionsMetricsReporter {
15 /**
16 * Tracks per-page-load metrics for content suggestions.
17 * @param categories The categories of content suggestions.
18 * @param suggestionsPerCategory The number of content suggestions in each c ategory.
19 */
20 void onPageShown(int[] categories, int[] suggestionsPerCategory);
21
22 /**
23 * Tracks impression metrics for a content suggestion.
24 * @param suggestion The content suggestion that was shown to the user.
25 */
26 void onSuggestionShown(SnippetArticle suggestion);
27
28 /**
29 * Tracks interaction metrics for a content suggestion.
30 * @param suggestion The content suggestion that the user opened.
31 * @param windowOpenDisposition How the suggestion was opened (current tab, new tab,
32 * new window etc).
33 */
34 void onSuggestionOpened(SnippetArticle suggestion, int windowOpenDisposition );
35
36 /**
37 * Tracks impression metrics for the long-press menu for a content suggestio n.
38 * @param suggestion The content suggestion for which the long-press menu wa s opened.
39 */
40 void onSuggestionMenuOpened(SnippetArticle suggestion);
41
42 /**
43 * Tracks impression metrics for a category's action button ("More").
44 * @param category The action button that was shown.
45 */
46 void onMoreButtonShown(@CategoryInt ActionItem category);
47
48 /**
49 * Tracks click metrics for a category's action button ("More").
50 * @param category The action button that was clicked.
51 */
52 void onMoreButtonClicked(@CategoryInt ActionItem category);
53
54 /** Sets the ranker to use to compute some of the reported metrics. */
55 void setRanker(SuggestionsRanker suggestionsRanker);
56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698