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

Side by Side Diff: net/base/net_string_util_icu_alternatives_android.cc

Issue 2215863002: Fix cronet build after JNI registration change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/base/net_string_util_icu_alternatives_android.h ('k') | net/net.gyp » ('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 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
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
OLDNEW
« no previous file with comments | « net/base/net_string_util_icu_alternatives_android.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698