diff options
author | Steve Block <steveblock@google.com> | 2011-01-06 17:35:52 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-01-06 18:20:24 +0000 |
commit | 5e8fa1efdccd0072c3e6e80e265a77568179577e (patch) | |
tree | 0673eb874827cb947e5a05186fd6345a00a79eab /WebKit/android/jni/WebCoreJni.h | |
parent | 79b35ce109b9fdca7c7e3af24996c1a2a612f1a4 (diff) | |
download | external_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.h | 6 |
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 } |