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

Side by Side Diff: base/android/jni_array.h

Issue 7828084: Refactor ScopedJavaRef (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: operator= docs Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_ANDROID_JNI_ARRAY_H_ 5 #ifndef BASE_ANDROID_JNI_ARRAY_H_
6 #define BASE_ANDROID_JNI_ARRAY_H_ 6 #define BASE_ANDROID_JNI_ARRAY_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 namespace base { 12 namespace base {
13 namespace android { 13 namespace android {
14 14
15 // Returns a new Java byte array converted from the given bytes array. 15 // Returns a new Java byte array converted from the given bytes array.
16 jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len); 16 jbyteArray ToJavaByteArray(JNIEnv* env, const unsigned char* bytes, size_t len);
17 17
18 // Returns a array of Java byte array converted from |v|. 18 // Returns a array of Java byte array converted from |v|.
19 jobjectArray ToJavaArrayOfByteArray(JNIEnv* env, 19 jobjectArray ToJavaArrayOfByteArray(JNIEnv* env,
20 const std::vector<std::string>& v); 20 const std::vector<std::string>& v);
21 21
22 jobjectArray ToJavaArrayOfStrings(JNIEnv* env,
23 const std::vector<std::string>& v);
24
22 } // namespace android 25 } // namespace android
23 } // namespace base 26 } // namespace base
24 27
25 #endif // BASE_ANDROID_JNI_ARRAY_H_ 28 #endif // BASE_ANDROID_JNI_ARRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698