Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java |
| index d58497ae21dda1e04bc7d7375192170bf70c2b4e..2ae90e3255e2d73a369fb63f7902932ce8ceb383 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java |
| @@ -53,9 +53,16 @@ public class OfflinePageEvaluationBridge { |
| public void savePageRequestChanged(SavePageRequest request) {} |
| } |
| - public static OfflinePageEvaluationBridge getForProfile(Profile profile) { |
| + /** |
| + * Get the instance of the evaluation bridge. |
| + * @param profile The profile used to get bridge. |
| + * @param useEvaluationScheduler True if using the evaluation scheduler instead of the |
| + * GCMNetworkManager one. |
| + */ |
| + public static OfflinePageEvaluationBridge getForProfile( |
| + Profile profile, boolean useEvaluationScheduler) { |
| ThreadUtils.assertOnUiThread(); |
| - return nativeGetBridgeForProfile(profile); |
| + return nativeGetBridgeForProfile(profile, useEvaluationScheduler); |
| } |
| private long mNativeOfflinePageEvaluationBridge; |
| @@ -118,8 +125,8 @@ public class OfflinePageEvaluationBridge { |
| * Force request coordinator to process the requests in the queue. |
|
dougarnett
2016/10/19 16:46:25
doc return val
romax
2016/10/19 19:32:42
Done.
|
| * @param callback The callback would be invoked after the operation completes. |
| */ |
| - public void pushRequestProcessing(final Callback<Boolean> callback) { |
| - nativePushRequestProcessing(mNativeOfflinePageEvaluationBridge, callback); |
| + public boolean pushRequestProcessing(final Callback<Boolean> callback) { |
| + return nativePushRequestProcessing(mNativeOfflinePageEvaluationBridge, callback); |
| } |
| /** |
| @@ -184,12 +191,13 @@ public class OfflinePageEvaluationBridge { |
| creationTime, accessCount, lastAccessTimeMs); |
| } |
| - private static native OfflinePageEvaluationBridge nativeGetBridgeForProfile(Profile profile); |
| + private static native OfflinePageEvaluationBridge nativeGetBridgeForProfile( |
| + Profile profile, boolean useEvaluationScheduler); |
| private native void nativeGetAllPages(long nativeOfflinePageEvaluationBridge, |
| List<OfflinePageItem> offlinePages, final Callback<List<OfflinePageItem>> callback); |
| private native void nativeSavePageLater(long nativeOfflinePageEvaluationBridge, String url, |
| String clientNamespace, String clientId, boolean userRequested); |
| - private native void nativePushRequestProcessing( |
| + private native boolean nativePushRequestProcessing( |
| long nativeOfflinePageEvaluationBridge, Callback<Boolean> callback); |
| } |