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

Unified Diff: ui/android/window_android.cc

Issue 2231923002: Make GetApplicationContext return a JavaRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix not-currently-compiled unit test Created 4 years, 4 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: ui/android/window_android.cc
diff --git a/ui/android/window_android.cc b/ui/android/window_android.cc
index 403ca0b397bac4c35cfa69051d28a09dc2e33df6..376d9b57b7fb2f21ff2840a9d1166c3c64a9aa87 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -18,6 +18,7 @@ namespace ui {
using base::android::AttachCurrentThread;
using base::android::JavaParamRef;
+using base::android::JavaRef;
using base::android::ScopedJavaLocalRef;
WindowAndroid::WindowAndroid(JNIEnv* env, jobject obj) : compositor_(NULL) {
@@ -43,7 +44,7 @@ WindowAndroid::~WindowAndroid() {
WindowAndroid* WindowAndroid::createForTesting() {
JNIEnv* env = AttachCurrentThread();
- jobject context = base::android::GetApplicationContext();
+ const JavaRef<jobject>& context = base::android::GetApplicationContext();
return new WindowAndroid(
env, Java_WindowAndroid_createForTesting(env, context).obj());
}

Powered by Google App Engine
This is Rietveld 408576698