| 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 "net/http/http_auth_controller.h" | 5 #include "net/http/http_auth_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } // namespace | 123 } // namespace |
| 124 | 124 |
| 125 HttpAuthController::HttpAuthController( | 125 HttpAuthController::HttpAuthController( |
| 126 HttpAuth::Target target, | 126 HttpAuth::Target target, |
| 127 const GURL& auth_url, | 127 const GURL& auth_url, |
| 128 HttpAuthCache* http_auth_cache, | 128 HttpAuthCache* http_auth_cache, |
| 129 HttpAuthHandlerFactory* http_auth_handler_factory) | 129 HttpAuthHandlerFactory* http_auth_handler_factory) |
| 130 : target_(target), | 130 : target_(target), |
| 131 auth_url_(auth_url), | 131 auth_url_(auth_url), |
| 132 auth_origin_(auth_url.GetOrigin()), | 132 auth_origin_(auth_url.GetOrigin()), |
| 133 auth_path_(HttpAuth::AUTH_PROXY ? std::string() : auth_url.path()), | 133 auth_path_(HttpAuth::AUTH_PROXY ? std::string() |
| 134 : auth_url.path().as_string()), |
| 134 embedded_identity_used_(false), | 135 embedded_identity_used_(false), |
| 135 default_credentials_used_(false), | 136 default_credentials_used_(false), |
| 136 http_auth_cache_(http_auth_cache), | 137 http_auth_cache_(http_auth_cache), |
| 137 http_auth_handler_factory_(http_auth_handler_factory) { | 138 http_auth_handler_factory_(http_auth_handler_factory) {} |
| 138 } | |
| 139 | 139 |
| 140 HttpAuthController::~HttpAuthController() { | 140 HttpAuthController::~HttpAuthController() { |
| 141 DCHECK(CalledOnValidThread()); | 141 DCHECK(CalledOnValidThread()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 int HttpAuthController::MaybeGenerateAuthToken( | 144 int HttpAuthController::MaybeGenerateAuthToken( |
| 145 const HttpRequestInfo* request, | 145 const HttpRequestInfo* request, |
| 146 const CompletionCallback& callback, | 146 const CompletionCallback& callback, |
| 147 const NetLogWithSource& net_log) { | 147 const NetLogWithSource& net_log) { |
| 148 DCHECK(CalledOnValidThread()); | 148 DCHECK(CalledOnValidThread()); |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 DCHECK(CalledOnValidThread()); | 536 DCHECK(CalledOnValidThread()); |
| 537 disabled_schemes_.insert(scheme); | 537 disabled_schemes_.insert(scheme); |
| 538 } | 538 } |
| 539 | 539 |
| 540 void HttpAuthController::DisableEmbeddedIdentity() { | 540 void HttpAuthController::DisableEmbeddedIdentity() { |
| 541 DCHECK(CalledOnValidThread()); | 541 DCHECK(CalledOnValidThread()); |
| 542 embedded_identity_used_ = true; | 542 embedded_identity_used_ = true; |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace net | 545 } // namespace net |
| OLD | NEW |