summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebCoreJni.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-01-06 17:35:52 +0000
committerSteve Block <steveblock@google.com>2011-01-06 18:20:24 +0000
commit5e8fa1efdccd0072c3e6e80e265a77568179577e (patch)
tree0673eb874827cb947e5a05186fd6345a00a79eab /WebKit/android/jni/WebCoreJni.h
parent79b35ce109b9fdca7c7e3af24996c1a2a612f1a4 (diff)
downloadexternal_webkit-5e8fa1efdccd0072c3e6e80e265a77568179577e.zip
external_webkit-5e8fa1efdccd0072c3e6e80e265a77568179577e.tar.gz
external_webkit-5e8fa1efdccd0072c3e6e80e265a77568179577e.tar.bz2
Add a stdStringToJstring() helper function
Change-Id: I323c753d7ce22e0e23928a126cfb99c781a074f1
Diffstat (limited to 'WebKit/android/jni/WebCoreJni.h')
-rw-r--r--WebKit/android/jni/WebCoreJni.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebCoreJni.h b/WebKit/android/jni/WebCoreJni.h
index 7e01912..6e6a486 100644
--- a/WebKit/android/jni/WebCoreJni.h
+++ b/WebKit/android/jni/WebCoreJni.h
@@ -79,9 +79,13 @@ jstring wtfStringToJstring(JNIEnv*, const WTF::String&, bool validOnZeroLength =
#if USE(CHROME_NETWORK_STACK)
string16 jstringToString16(JNIEnv*, jstring);
-#endif
std::string jstringToStdString(JNIEnv*, jstring);
+// Returns a local reference to a new jstring. If validOnZeroLength is true then
+// passing in an empty std::string will result in an empty jstring. Otherwise
+// an empty std::string returns 0.
+jstring stdStringToJstring(JNIEnv*, const std::string&, bool validOnZeroLength = false);
+#endif
}