From 5b7723d28caa3e8a979bcd40a9d634b410c23ec2 Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Thu, 21 Oct 2010 17:56:42 +0100 Subject: Move jstringToStdString into WebCoreJni.h Also tweaked the implementation slightly to match jstringToString16, which is more robust. Change-Id: I614576615a6f429ea1632c395d5bc4e068c32cfb --- WebKit/android/jni/WebCoreFrameBridge.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'WebKit/android/jni/WebCoreFrameBridge.cpp') diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index 010c6df..6b3f009 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -1826,15 +1826,6 @@ static void OrientationChanged(JNIEnv *env, jobject obj, int orientation) pFrame->sendOrientationChangeEvent(orientation); } -static std::string jstringToStdString(JNIEnv* env, jstring jstr) { - jsize size = env->GetStringUTFLength(jstr); - jboolean isCopy; - const char* cstr = env->GetStringUTFChars(jstr, &isCopy); - std::string result(cstr, cstr + size); - env->ReleaseStringUTFChars(jstr, cstr); - return result; -} - #if USE(CHROME_NETWORK_STACK) static void AuthenticationProceed(JNIEnv *env, jobject obj, int handle, jstring jUsername, jstring jPassword) -- cgit v1.1