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

Unified Diff: remoting/client/jni/chromoting_jni_runtime.cc

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | sync/android/model_type_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_runtime.cc
diff --git a/remoting/client/jni/chromoting_jni_runtime.cc b/remoting/client/jni/chromoting_jni_runtime.cc
index 88572e801b93e361c3647fb57ecf1ba3156ff202..cb7dbb0e9865cb0fc78b5aa885c39e19bfcecdaa 100644
--- a/remoting/client/jni/chromoting_jni_runtime.cc
+++ b/remoting/client/jni/chromoting_jni_runtime.cc
@@ -53,20 +53,21 @@
remoting::ChromotingJniRuntime::GetInstance();
}
-static ScopedJavaLocalRef<jstring> GetApiKey(JNIEnv* env, jclass clazz) {
- return ConvertUTF8ToJavaString(env, google_apis::GetAPIKey().c_str());
-}
-
-static ScopedJavaLocalRef<jstring> GetClientId(JNIEnv* env, jclass clazz) {
+static jstring GetApiKey(JNIEnv* env, jclass clazz) {
return ConvertUTF8ToJavaString(
- env,
- google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING).c_str());
-}
-
-static ScopedJavaLocalRef<jstring> GetClientSecret(JNIEnv* env, jclass clazz) {
+ env, google_apis::GetAPIKey().c_str()).Release();
+}
+
+static jstring GetClientId(JNIEnv* env, jclass clazz) {
return ConvertUTF8ToJavaString(
- env,
- google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING).c_str());
+ env, google_apis::GetOAuth2ClientID(
+ google_apis::CLIENT_REMOTING).c_str()).Release();
+}
+
+static jstring GetClientSecret(JNIEnv* env, jclass clazz) {
+ return ConvertUTF8ToJavaString(
+ env, google_apis::GetOAuth2ClientSecret(
+ google_apis::CLIENT_REMOTING).c_str()).Release();
}
static void Connect(JNIEnv* env,
« no previous file with comments | « net/cert/x509_util_android.cc ('k') | sync/android/model_type_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698