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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/ntp/FakeMostVisitedSites.java

Issue 1373983003: Add UMA stats for which icon types are shown and clicked on the NTP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test Created 5 years, 2 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.ntp; 5 package org.chromium.chrome.browser.ntp;
6 6
7 import org.chromium.base.ThreadUtils; 7 import org.chromium.base.ThreadUtils;
8 import org.chromium.chrome.browser.profiles.MostVisitedSites; 8 import org.chromium.chrome.browser.profiles.MostVisitedSites;
9 import org.chromium.chrome.browser.profiles.Profile; 9 import org.chromium.chrome.browser.profiles.Profile;
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 mMostVisitedUrls.clone()); 42 mMostVisitedUrls.clone());
43 } 43 }
44 }); 44 });
45 } 45 }
46 46
47 @Override 47 @Override
48 public void getURLThumbnail(String url, final ThumbnailCallback callback) { 48 public void getURLThumbnail(String url, final ThumbnailCallback callback) {
49 ThreadUtils.postOnUiThread(new Runnable() { 49 ThreadUtils.postOnUiThread(new Runnable() {
50 @Override 50 @Override
51 public void run() { 51 public void run() {
52 callback.onMostVisitedURLsThumbnailAvailable(null); 52 callback.onMostVisitedURLsThumbnailAvailable(null, true);
53 } 53 }
54 }); 54 });
55 } 55 }
56 56
57 @Override 57 @Override
58 public void blacklistUrl(String url) { 58 public void blacklistUrl(String url) {
59 mBlacklistedUrls.add(url); 59 mBlacklistedUrls.add(url);
60 } 60 }
61 61
62 /** 62 /**
63 * @return Whether blacklistUrl() has been called on the given url. 63 * @return Whether blacklistUrl() has been called on the given url.
64 */ 64 */
65 public boolean isUrlBlacklisted(String url) { 65 public boolean isUrlBlacklisted(String url) {
66 return mBlacklistedUrls.contains(url); 66 return mBlacklistedUrls.contains(url);
67 } 67 }
68 68
69 @Override 69 @Override
70 public void recordOpenedMostVisitedItem(int index) { 70 public void recordTileTypeMetrics(int[] tileTypes, boolean isIconMode) {
71 // Metrics are stubbed out.
72 }
73
74 @Override
75 public void recordOpenedMostVisitedItem(int index, int tileType) {
71 // Metrics are stubbed out. 76 // Metrics are stubbed out.
72 } 77 }
73 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698