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

Unified Diff: base/android/jni_map.h

Issue 12255042: [Android] Introduce a Java wrapper for TemplateUrlService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 10 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 | « no previous file | base/android/jni_map.cc » ('j') | base/android/jni_map.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_map.h
diff --git a/base/android/jni_map.h b/base/android/jni_map.h
new file mode 100644
index 0000000000000000000000000000000000000000..b2e333c52c702c25d1ad78f5e8df93357911b345
--- /dev/null
+++ b/base/android/jni_map.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_JNI_MAP_H_
+#define BASE_ANDROID_JNI_MAP_H_
+
+#include <jni.h>
+#include <map>
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/base_export.h"
+#include "base/string16.h"
+
+namespace base {
+namespace android {
+
+// 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.
+BASE_EXPORT ScopedJavaLocalRef<jobject> ConvertMapToJavaMap(
+ JNIEnv* env,
+ const std::map<std::string, string16>& cmap);
+
+// Convert a Java subclass of map to std::map. Assumes values are string16
+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.
+ jobject jmap);
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_JNI_MAP_H_
+
bulach 2013/02/20 14:41:25 nit: extra \n
Yaron 2013/02/21 21:39:15 Done.
« no previous file with comments | « no previous file | base/android/jni_map.cc » ('j') | base/android/jni_map.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698