| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| index 2ece634b09b1e037a72a4b0bdb8b07086a5d5189..b2c0a573ae72a41cc130e92e7322efc40e8e3974 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| @@ -28,8 +28,8 @@ public class SnippetsBridge {
|
| public interface SnippetsObserver {
|
| void onSnippetsReceived(List<SnippetArticle> snippets);
|
|
|
| - /** Called when the service is about to change its state. */
|
| - void onDisabledReasonChanged(int disabledReason);
|
| + /** Called when the ARTICLES category is about to change its status. */
|
| + void onCategoryStatusChanged(int newStatus);
|
| }
|
|
|
| /**
|
| @@ -109,30 +109,29 @@ public class SnippetsBridge {
|
| nativeSetObserver(mNativeSnippetsBridge, observer == null ? null : this);
|
| }
|
|
|
| - public int getDisabledReason() {
|
| + public int getCategoryStatus() {
|
| assert mNativeSnippetsBridge != 0;
|
| - return nativeGetDisabledReason(mNativeSnippetsBridge);
|
| + return nativeGetCategoryStatus(mNativeSnippetsBridge);
|
| }
|
|
|
| @CalledByNative
|
| private void onSnippetsAvailable(String[] ids, String[] titles, String[] urls, String[] ampUrls,
|
| - String[] thumbnailUrls, String[] previewText, long[] timestamps, String[] publishers,
|
| - float[] scores) {
|
| + String[] previewText, long[] timestamps, String[] publishers, float[] scores) {
|
| assert mNativeSnippetsBridge != 0;
|
| assert mObserver != null;
|
|
|
| List<SnippetArticle> newSnippets = new ArrayList<>(ids.length);
|
| for (int i = 0; i < ids.length; i++) {
|
| newSnippets.add(new SnippetArticle(ids[i], titles[i], publishers[i], previewText[i],
|
| - urls[i], ampUrls[i], thumbnailUrls[i], timestamps[i], scores[i], i));
|
| + urls[i], ampUrls[i], timestamps[i], scores[i], i));
|
| }
|
|
|
| mObserver.onSnippetsReceived(newSnippets);
|
| }
|
|
|
| @CalledByNative
|
| - private void onDisabledReasonChanged(int disabledReason) {
|
| - if (mObserver != null) mObserver.onDisabledReasonChanged(disabledReason);
|
| + private void onCategoryStatusChanged(int newStatus) {
|
| + if (mObserver != null) mObserver.onCategoryStatusChanged(newStatus);
|
| }
|
|
|
| private native long nativeInit(Profile profile);
|
| @@ -145,5 +144,5 @@ public class SnippetsBridge {
|
| Callback<Boolean> callback, String url);
|
| private native void nativeFetchImage(
|
| long nativeNTPSnippetsBridge, String snippetId, Callback<Bitmap> callback);
|
| - private native int nativeGetDisabledReason(long nativeNTPSnippetsBridge);
|
| + private native int nativeGetCategoryStatus(long nativeNTPSnippetsBridge);
|
| }
|
|
|