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

Unified Diff: chrome/browser/android/offline_pages/background_scheduler_bridge.cc

Issue 2400393002: Set up a backup schedule request if we have deferred requests. (Closed)
Patch Set: CR feedback per Dimich Created 4 years, 2 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/browser/android/offline_pages/background_scheduler_bridge.cc
diff --git a/chrome/browser/android/offline_pages/background_scheduler_bridge.cc b/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
index c6af2da10173d5abce7c29be3cb9dbcf900d2057..4feb822d2908db1a31d6bf7b240c128ddc1d5689 100644
--- a/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
+++ b/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
@@ -65,6 +65,17 @@ void BackgroundSchedulerBridge::Schedule(
Java_BackgroundSchedulerBridge_schedule(env, j_conditions);
}
+void BackgroundSchedulerBridge::BackupSchedule(
+ const TriggerConditions& trigger_conditions, long delay_in_seconds) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> j_conditions =
+ CreateTriggerConditions(env, trigger_conditions.require_power_connected,
+ trigger_conditions.minimum_battery_percentage,
+ trigger_conditions.require_unmetered_network);
+ Java_BackgroundSchedulerBridge_backupSchedule(
+ env, j_conditions, delay_in_seconds);
+}
+
void BackgroundSchedulerBridge::Unschedule() {
JNIEnv* env = base::android::AttachCurrentThread();
Java_BackgroundSchedulerBridge_unschedule(env);

Powered by Google App Engine
This is Rietveld 408576698