| Index: base/android/jni_array.h
|
| diff --git a/base/android/jni_array.h b/base/android/jni_array.h
|
| index edf05c6c4fed436703f0de46a9d0558bfebdf52e..e5ca3693f13c2bb1821be8e843c2322b98022959 100644
|
| --- a/base/android/jni_array.h
|
| +++ b/base/android/jni_array.h
|
| @@ -9,18 +9,32 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "base/basictypes.h"
|
| +
|
| namespace base {
|
| namespace android {
|
|
|
| // Returns a new Java byte array converted from the given bytes array.
|
| -jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len);
|
| +ScopedJavaLocalRef<jbyteArray> ToJavaByteArray(
|
| + JNIEnv* env, const uint8* bytes, size_t len);
|
|
|
| // Returns a array of Java byte array converted from |v|.
|
| -jobjectArray ToJavaArrayOfByteArray(JNIEnv* env,
|
| - const std::vector<std::string>& v);
|
| +ScopedJavaLocalRef<jobjectArray> ToJavaArrayOfByteArray(
|
| + JNIEnv* env, const std::vector<std::string>& v);
|
| +
|
| +ScopedJavaLocalRef<jobjectArray> ToJavaArrayOfStrings(
|
| + JNIEnv* env, const std::vector<std::string>& v);
|
| +
|
| +// Appends the Java bytes in |bytes_array| onto the end of |out|.
|
| +void AppendJavaByteArrayToByteVector(JNIEnv* env,
|
| + jbyteArray byte_array,
|
| + std::vector<uint8>* out);
|
|
|
| -jobjectArray ToJavaArrayOfStrings(JNIEnv* env,
|
| - const std::vector<std::string>& v);
|
| +// Replaces the content of |out| with the Java bytes in |bytes_array|.
|
| +void JavaByteArrayToByteVector(JNIEnv* env,
|
| + jbyteArray byte_array,
|
| + std::vector<uint8>* out);
|
|
|
| } // namespace android
|
| } // namespace base
|
|
|