| 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 a3cbb6d98b4508004673a4fd8c2241afae37e8a3..40364ba072b9a2b33d74887057ac8655fbe7a81e 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
|
| @@ -69,17 +69,19 @@ public class SnippetsBridge implements SuggestionsSource {
|
| * Reschedules the fetching of snippets.
|
| */
|
| public static void rescheduleFetching() {
|
| - nativeRescheduleFetching();
|
| + nativeRemoteSuggestionsSchedulerRescheduleFetching();
|
| }
|
|
|
| + /**
|
| + * Fetches remote suggestions in background.
|
| + */
|
| public static void fetchRemoteSuggestionsFromBackground() {
|
| - // Do not force regular background fetches.
|
| - nativeFetchRemoteSuggestionsInTheBackground();
|
| + nativeRemoteSuggestionsSchedulerOnFetchDue();
|
| }
|
|
|
| @Override
|
| public void fetchRemoteSuggestions() {
|
| - nativeFetchRemoteSuggestions();
|
| + nativeReloadSuggestions(mNativeSnippetsBridge);
|
| }
|
|
|
| @Override
|
| @@ -271,9 +273,9 @@ public class SnippetsBridge implements SuggestionsSource {
|
|
|
| private native long nativeInit(Profile profile);
|
| private native void nativeDestroy(long nativeNTPSnippetsBridge);
|
| - private static native void nativeFetchRemoteSuggestions();
|
| - private static native void nativeFetchRemoteSuggestionsInTheBackground();
|
| - private static native void nativeRescheduleFetching();
|
| + private native void nativeReloadSuggestions(long nativeNTPSnippetsBridge);
|
| + private static native void nativeRemoteSuggestionsSchedulerOnFetchDue();
|
| + private static native void nativeRemoteSuggestionsSchedulerRescheduleFetching();
|
| private native int[] nativeGetCategories(long nativeNTPSnippetsBridge);
|
| private native int nativeGetCategoryStatus(long nativeNTPSnippetsBridge, int category);
|
| private native SuggestionsCategoryInfo nativeGetCategoryInfo(
|
|
|