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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_launcher.cc

Issue 1869323003: [NTP Snippets] Scheduler: Fetch on Wifi (without charging) only 6AM-10PM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_merge_controller
Patch Set: remove fudge Created 4 years, 8 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/ntp/ntp_snippets_launcher.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_launcher.cc b/chrome/browser/android/ntp/ntp_snippets_launcher.cc
index d09ee99ca326773087cc581a06172281ef1d7374..4fb26418c5c2fb9ef8acab4b0096541ca28d3f24 100644
--- a/chrome/browser/android/ntp/ntp_snippets_launcher.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_launcher.cc
@@ -30,13 +30,15 @@ bool NTPSnippetsLauncher::Register(JNIEnv* env) {
bool NTPSnippetsLauncher::Schedule(base::TimeDelta period_wifi_charging,
base::TimeDelta period_wifi,
- base::TimeDelta period_fallback) {
+ base::TimeDelta period_fallback,
+ base::Time reschedule_time) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = base::android::AttachCurrentThread();
return Java_SnippetsLauncher_schedule(
env, java_launcher_.obj(), period_wifi_charging.InSeconds(),
- period_wifi.InSeconds(), period_fallback.InSeconds());
+ period_wifi.InSeconds(), period_fallback.InSeconds(),
+ reschedule_time.ToJavaTime());
}
bool NTPSnippetsLauncher::Unschedule() {
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_launcher.h ('k') | components/ntp_snippets/ntp_snippets_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698