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

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

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/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 55f1b37ad7720ef810034b2601474948111216f4..3075cb2ab30c79e13a67a6aad0383c60a64c8ca4 100644
--- a/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
+++ b/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/android/callback_android.h"
#include "base/android/scoped_java_ref.h"
#include "chrome/browser/android/offline_pages/background_scheduler_bridge.h"
#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
@@ -21,9 +22,7 @@ namespace {
// C++ callback that delegates to Java callback.
void ProcessingDoneCallback(
const ScopedJavaGlobalRef<jobject>& j_callback_obj, jboolean result) {
- JNIEnv* env = base::android::AttachCurrentThread();
- Java_ProcessingDoneCallback_onProcessingDone(
- env, j_callback_obj.obj(), result);
+ base::android::RunCallbackAndroid(j_callback_obj, result);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698