| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/http_auth_negotiate_android.h" | 5 #include "net/android/http_auth_negotiate_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "jni/HttpNegotiateAuthenticator_jni.h" | 13 #include "jni/HttpNegotiateAuthenticator_jni.h" |
| 14 #include "net/base/auth.h" | 14 #include "net/base/auth.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/http/http_auth_challenge_tokenizer.h" | 16 #include "net/http/http_auth_challenge_tokenizer.h" |
| 17 #include "net/http/http_auth_multi_round_parse.h" | 17 #include "net/http/http_auth_multi_round_parse.h" |
| 18 #include "net/http/http_auth_preferences.h" | 18 #include "net/http/http_auth_preferences.h" |
| 19 | 19 |
| 20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
| 21 using base::android::ConvertUTF8ToJavaString; | 21 using base::android::ConvertUTF8ToJavaString; |
| 22 using base::android::ConvertJavaStringToUTF8; | 22 using base::android::ConvertJavaStringToUTF8; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 const std::string& raw_token) { | 153 const std::string& raw_token) { |
| 154 DCHECK(auth_token_); | 154 DCHECK(auth_token_); |
| 155 DCHECK(!completion_callback_.is_null()); | 155 DCHECK(!completion_callback_.is_null()); |
| 156 if (result == OK) | 156 if (result == OK) |
| 157 *auth_token_ = "Negotiate " + raw_token; | 157 *auth_token_ = "Negotiate " + raw_token; |
| 158 base::ResetAndReturn(&completion_callback_).Run(result); | 158 base::ResetAndReturn(&completion_callback_).Run(result); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace android | 161 } // namespace android |
| 162 } // namespace net | 162 } // namespace net |
| OLD | NEW |