Chromium Code Reviews| 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); |
|
Bernhard Bauer
2016/06/07 08:43:42
Wait, does this work when |j_callback_obj| is a Pr
Pete Williamson
2016/06/07 22:04:12
Ah, good catch. I was thinking that since the arg
|
| } |
| } // namespace |