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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java

Issue 2030773002: Add unit tests for the Background Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable flaky test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java
new file mode 100644
index 0000000000000000000000000000000000000000..499f464e366a24fba723e3e5a60dcb99b6252d0d
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.offlinepages.interfaces;
+
+import org.chromium.base.Callback;
+
+/**
+ * Interface to allow mocking out the BackgroundSchedulerProcessor, which must call static
+ * methods in BackgroundSchedulerBridge.
+ */
+public interface BackgroundSchedulerProcessor {
+ /**
+ * Starts processing of one or more queued background requests. Returns whether processing was
+ * started and that caller should expect a callback (once processing has completed or
+ * terminated). If processing was already active or not able to process for some other reason,
+ * returns false and this calling instance will not receive a callback.
+ */
+ boolean startProcessing(Callback<Boolean> callback);
+}

Powered by Google App Engine
This is Rietveld 408576698