OLD | NEW |
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 "android_webview/native/aw_http_auth_handler.h" | 5 #include "android_webview/native/aw_http_auth_handler.h" |
6 | 6 |
7 #include "android_webview/browser/aw_login_delegate.h" | 7 #include "android_webview/browser/aw_login_delegate.h" |
8 #include "android_webview/native/aw_contents.h" | 8 #include "android_webview/native/aw_contents.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "jni/AwHttpAuthHandler_jni.h" | 12 #include "jni/AwHttpAuthHandler_jni.h" |
13 #include "net/base/auth.h" | 13 #include "net/base/auth.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 | 15 |
16 using base::android::ConvertJavaStringToUTF16; | 16 using base::android::ConvertJavaStringToUTF16; |
| 17 using base::android::JavaParamRef; |
17 using content::BrowserThread; | 18 using content::BrowserThread; |
18 | 19 |
19 namespace android_webview { | 20 namespace android_webview { |
20 | 21 |
21 AwHttpAuthHandler::AwHttpAuthHandler(AwLoginDelegate* login_delegate, | 22 AwHttpAuthHandler::AwHttpAuthHandler(AwLoginDelegate* login_delegate, |
22 net::AuthChallengeInfo* auth_info, | 23 net::AuthChallengeInfo* auth_info, |
23 bool first_auth_attempt) | 24 bool first_auth_attempt) |
24 : login_delegate_(login_delegate), | 25 : login_delegate_(login_delegate), |
25 host_(auth_info->challenger.host()), | 26 host_(auth_info->challenger.host()), |
26 realm_(auth_info->realm) { | 27 realm_(auth_info->realm) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 net::AuthChallengeInfo* auth_info, | 73 net::AuthChallengeInfo* auth_info, |
73 bool first_auth_attempt) { | 74 bool first_auth_attempt) { |
74 return new AwHttpAuthHandler(login_delegate, auth_info, first_auth_attempt); | 75 return new AwHttpAuthHandler(login_delegate, auth_info, first_auth_attempt); |
75 } | 76 } |
76 | 77 |
77 bool RegisterAwHttpAuthHandler(JNIEnv* env) { | 78 bool RegisterAwHttpAuthHandler(JNIEnv* env) { |
78 return RegisterNativesImpl(env); | 79 return RegisterNativesImpl(env); |
79 } | 80 } |
80 | 81 |
81 } // namespace android_webview | 82 } // namespace android_webview |
OLD | NEW |