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

Side by Side Diff: net/android/gurl_utils.cc

Issue 2209993003: Add missing using statements for JNI types. (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/android/dummy_spnego_authenticator.cc ('k') | net/android/http_auth_negotiate_android.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 "net/android/gurl_utils.h" 5 #include "net/android/gurl_utils.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "jni/GURLUtils_jni.h" 8 #include "jni/GURLUtils_jni.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 using base::android::JavaParamRef;
12 using base::android::ScopedJavaLocalRef;
13
11 namespace net { 14 namespace net {
12 15
13 ScopedJavaLocalRef<jstring> GetOrigin(JNIEnv* env, 16 ScopedJavaLocalRef<jstring> GetOrigin(JNIEnv* env,
14 const JavaParamRef<jclass>& clazz, 17 const JavaParamRef<jclass>& clazz,
15 const JavaParamRef<jstring>& url) { 18 const JavaParamRef<jstring>& url) {
16 GURL host(base::android::ConvertJavaStringToUTF16(env, url)); 19 GURL host(base::android::ConvertJavaStringToUTF16(env, url));
17 20
18 return base::android::ConvertUTF8ToJavaString(env, host.GetOrigin().spec()); 21 return base::android::ConvertUTF8ToJavaString(env, host.GetOrigin().spec());
19 } 22 }
20 23
21 ScopedJavaLocalRef<jstring> GetScheme(JNIEnv* env, 24 ScopedJavaLocalRef<jstring> GetScheme(JNIEnv* env,
22 const JavaParamRef<jclass>& clazz, 25 const JavaParamRef<jclass>& clazz,
23 const JavaParamRef<jstring>& url) { 26 const JavaParamRef<jstring>& url) {
24 GURL host(base::android::ConvertJavaStringToUTF16(env, url)); 27 GURL host(base::android::ConvertJavaStringToUTF16(env, url));
25 28
26 return base::android::ConvertUTF8ToJavaString(env, host.scheme()); 29 return base::android::ConvertUTF8ToJavaString(env, host.scheme());
27 } 30 }
28 31
29 bool RegisterGURLUtils(JNIEnv* env) { 32 bool RegisterGURLUtils(JNIEnv* env) {
30 return RegisterNativesImpl(env); 33 return RegisterNativesImpl(env);
31 } 34 }
32 35
33 } // net namespace 36 } // net namespace
OLDNEW
« no previous file with comments | « net/android/dummy_spnego_authenticator.cc ('k') | net/android/http_auth_negotiate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698