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

Side by Side Diff: base/android/jni_string.cc

Issue 15735027: Use a direct include of utf_string_conversions.h in android_webview/, apps/, ash/, base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | base/android/jni_string_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/android/jni_string.h" 5 #include "base/android/jni_string.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 10
11 namespace { 11 namespace {
12 12
13 // Internal version that does not use a scoped local pointer. 13 // Internal version that does not use a scoped local pointer.
14 jstring ConvertUTF16ToJavaStringImpl(JNIEnv* env, 14 jstring ConvertUTF16ToJavaStringImpl(JNIEnv* env,
15 const base::StringPiece16& str) { 15 const base::StringPiece16& str) {
16 jstring result = env->NewString(str.data(), str.length()); 16 jstring result = env->NewString(str.data(), str.length());
17 base::android::CheckException(env); 17 base::android::CheckException(env);
18 return result; 18 return result;
19 } 19 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 ScopedJavaLocalRef<jstring> ConvertUTF16ToJavaString( 91 ScopedJavaLocalRef<jstring> ConvertUTF16ToJavaString(
92 JNIEnv* env, 92 JNIEnv* env,
93 const base::StringPiece16& str) { 93 const base::StringPiece16& str) {
94 return ScopedJavaLocalRef<jstring>(env, 94 return ScopedJavaLocalRef<jstring>(env,
95 ConvertUTF16ToJavaStringImpl(env, str)); 95 ConvertUTF16ToJavaStringImpl(env, str));
96 } 96 }
97 97
98 } // namespace android 98 } // namespace android
99 } // namespace base 99 } // namespace base
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | base/android/jni_string_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698