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

Unified Diff: android_webview/native/aw_http_auth_handler.cc

Issue 11663006: [Android WebView] Count the number of HTTP auth attempts we make. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_http_auth_handler.cc
diff --git a/android_webview/native/aw_http_auth_handler.cc b/android_webview/native/aw_http_auth_handler.cc
index e89fcc8349d47a8a20aef1d05cd6d00c15978320..be696dedcb5ea12f07f5fa9f88b7edf7a2c836d3 100644
--- a/android_webview/native/aw_http_auth_handler.cc
+++ b/android_webview/native/aw_http_auth_handler.cc
@@ -16,14 +16,16 @@ using base::android::ConvertJavaStringToUTF16;
namespace android_webview {
-AwHttpAuthHandler::AwHttpAuthHandler(
- AwLoginDelegate* login_delegate, net::AuthChallengeInfo* auth_info) :
- login_delegate_(make_scoped_refptr(login_delegate)),
- host_(auth_info->challenger.host()),
- realm_(auth_info->realm) {
+AwHttpAuthHandler::AwHttpAuthHandler(AwLoginDelegate* login_delegate,
+ net::AuthChallengeInfo* auth_info,
+ bool first_auth_attempt)
+ : login_delegate_(make_scoped_refptr(login_delegate)),
+ host_(auth_info->challenger.host()),
+ realm_(auth_info->realm) {
JNIEnv* env = base::android::AttachCurrentThread();
http_auth_handler_.Reset(
- Java_AwHttpAuthHandler_create(env, reinterpret_cast<jint>(this)));
+ Java_AwHttpAuthHandler_create(
+ env, reinterpret_cast<jint>(this), first_auth_attempt));
}
AwHttpAuthHandler:: ~AwHttpAuthHandler() {
@@ -52,8 +54,10 @@ void AwHttpAuthHandler::HandleOnUIThread(content::WebContents* web_contents) {
// static
AwHttpAuthHandlerBase* AwHttpAuthHandlerBase::Create(
- AwLoginDelegate* login_delegate, net::AuthChallengeInfo* auth_info) {
- return new AwHttpAuthHandler(login_delegate, auth_info);
+ AwLoginDelegate* login_delegate,
+ net::AuthChallengeInfo* auth_info,
+ bool first_auth_attempt) {
+ return new AwHttpAuthHandler(login_delegate, auth_info, first_auth_attempt);
}
bool RegisterAwHttpAuthHandler(JNIEnv* env) {

Powered by Google App Engine
This is Rietveld 408576698