| 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 <string.h> | 5 #include <string.h> |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // NULL indicates failure. | 27 // NULL indicates failure. |
| 28 if (java_result.is_null()) | 28 if (java_result.is_null()) |
| 29 return false; | 29 return false; |
| 30 | 30 |
| 31 base::string16 utf16_result = | 31 base::string16 utf16_result = |
| 32 base::android::ConvertJavaStringToUTF16(java_result); | 32 base::android::ConvertJavaStringToUTF16(java_result); |
| 33 output->Append(utf16_result.data(), static_cast<int>(utf16_result.size())); | 33 output->Append(utf16_result.data(), static_cast<int>(utf16_result.size())); |
| 34 return true; | 34 return true; |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool RegisterIcuAlternativesJni(JNIEnv* env) { | |
| 38 return android::RegisterNativesImpl(env); | |
| 39 } | |
| 40 | |
| 41 } // namespace url | 37 } // namespace url |
| OLD | NEW |