Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
|
Ilya Sherman
2013/03/11 22:39:44
nit: Remove the (c)
apiccion
2013/03/13 20:17:28
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BASE_ANDROID_JNI_LOCAL_REF_EXTENSIONS_H_ | |
| 6 #define BASE_ANDROID_JNI_LOCAL_REF_EXTENSIONS_H_ | |
| 7 | |
| 8 #include "base/android/jni_android.h" | |
| 9 #include "base/android/jni_array.h" | |
| 10 #include "base/android/jni_string.h" | |
| 11 | |
| 12 namespace base { | |
| 13 namespace android { | |
| 14 | |
| 15 // Returns an empty string if java string is null, | |
| 16 // otherwise converts and returns the string. | |
| 17 string16 SafeJavaStringToUTF16(ScopedJavaLocalRef<jstring> jstring); | |
|
Ilya Sherman
2013/03/11 22:39:44
nit: Should this be passed by const-ref?
apiccion
2013/03/13 20:17:28
Done.
| |
| 18 | |
| 19 // Fills |string_vector| with the contents of |jarray|. | |
| 20 // If the Java array is null, then |string_vector| is not modified. | |
| 21 void SafeJavaStringArrayToStringVector( | |
| 22 ScopedJavaLocalRef<jobjectArray> jarray, | |
|
Ilya Sherman
2013/03/11 22:39:44
nit: Should this be passed by const-ref?
apiccion
2013/03/13 20:17:28
Done.
| |
| 23 JNIEnv* env, | |
| 24 std::vector<string16>* string_vector); | |
| 25 | |
| 26 } // namespace android | |
| 27 } // namespace base | |
| 28 | |
| 29 #endif // BASE_ANDROID_JNI_LOCAL_REF_EXTENSIONS_H_ | |
| OLD | NEW |