OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "net/base/net_string_util_icu_alternatives_android.h" | |
6 | |
7 #include "base/android/jni_android.h" | 5 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 6 #include "base/android/jni_string.h" |
9 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
10 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
11 #include "jni/NetStringUtil_jni.h" | 9 #include "jni/NetStringUtil_jni.h" |
12 #include "net/base/net_string_util.h" | 10 #include "net/base/net_string_util.h" |
13 | 11 |
14 namespace net { | 12 namespace net { |
15 | 13 |
16 namespace { | 14 namespace { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 base::string16* output) { | 104 base::string16* output) { |
107 output->clear(); | 105 output->clear(); |
108 ScopedJavaLocalRef<jstring> java_result = | 106 ScopedJavaLocalRef<jstring> java_result = |
109 ConvertToJstringWithSubstitutions(text, charset); | 107 ConvertToJstringWithSubstitutions(text, charset); |
110 if (java_result.is_null()) | 108 if (java_result.is_null()) |
111 return false; | 109 return false; |
112 *output = base::android::ConvertJavaStringToUTF16(java_result); | 110 *output = base::android::ConvertJavaStringToUTF16(java_result); |
113 return true; | 111 return true; |
114 } | 112 } |
115 | 113 |
116 bool RegisterNetStringUtils(JNIEnv* env) { | |
117 return android::RegisterNativesImpl(env); | |
118 } | |
119 | |
120 } // namespace net | 114 } // namespace net |
OLD | NEW |