Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 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_MAP_H_ | |
| 6 #define BASE_ANDROID_JNI_MAP_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 #include <map> | |
| 10 #include <string> | |
| 11 | |
| 12 #include "base/android/scoped_java_ref.h" | |
| 13 #include "base/base_export.h" | |
| 14 #include "base/string16.h" | |
| 15 | |
| 16 namespace base { | |
| 17 namespace android { | |
| 18 | |
| 19 // Convert a std::map<std::string, string16> to a Java HashMap. | |
|
nyquist
2013/02/20 07:33:09
Mention the generics type of the Java HashMap (<St
Yaron
2013/02/21 21:39:15
Done.
| |
| 20 BASE_EXPORT ScopedJavaLocalRef<jobject> ConvertMapToJavaMap( | |
| 21 JNIEnv* env, | |
| 22 const std::map<std::string, string16>& cmap); | |
| 23 | |
| 24 // Convert a Java subclass of map to std::map. Assumes values are string16 | |
| 25 BASE_EXPORT std::map<std::string, string16> ConvertJavaMapToMap(JNIEnv* env, | |
|
nyquist
2013/02/20 07:33:09
Since you throw out both null keys and even null v
Yaron
2013/02/21 21:39:15
Done.
| |
| 26 jobject jmap); | |
| 27 | |
| 28 } // namespace android | |
| 29 } // namespace base | |
| 30 | |
| 31 #endif // BASE_ANDROID_JNI_MAP_H_ | |
| 32 | |
|
bulach
2013/02/20 14:41:25
nit: extra \n
Yaron
2013/02/21 21:39:15
Done.
| |
| OLD | NEW |