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

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

Issue 2794313002: [Remote suggestions] Prioritize wifi for soft fetches. (Closed)
Patch Set: Marc's comments Created 3 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 778f91fa0dd5654b79caa41332647832e38f09ea..0628d91ded9f92851840bc148c26cad43d101b54 100644
--- a/chrome/browser/android/ntp/ntp_snippets_launcher.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_launcher.cc
@@ -40,6 +40,13 @@ bool NTPSnippetsLauncher::Unschedule() {
return Java_SnippetsLauncher_unschedule(env, java_launcher_);
}
+bool NTPSnippetsLauncher::IsOnUnmeteredConnection() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ JNIEnv* env = base::android::AttachCurrentThread();
+ return Java_SnippetsLauncher_isOnUnmeteredConnection(env, java_launcher_);
+}
+
NTPSnippetsLauncher::NTPSnippetsLauncher() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);

Powered by Google App Engine
This is Rietveld 408576698