OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |