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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 458 } |
459 | 459 |
460 void HttpAuthController::PopulateAuthChallenge() { | 460 void HttpAuthController::PopulateAuthChallenge() { |
461 DCHECK(CalledOnValidThread()); | 461 DCHECK(CalledOnValidThread()); |
462 | 462 |
463 // Populates response_.auth_challenge with the authentication challenge info. | 463 // Populates response_.auth_challenge with the authentication challenge info. |
464 // This info is consumed by URLRequestHttpJob::GetAuthChallengeInfo(). | 464 // This info is consumed by URLRequestHttpJob::GetAuthChallengeInfo(). |
465 | 465 |
466 auth_info_ = new AuthChallengeInfo; | 466 auth_info_ = new AuthChallengeInfo; |
467 auth_info_->is_proxy = (target_ == HttpAuth::AUTH_PROXY); | 467 auth_info_->is_proxy = (target_ == HttpAuth::AUTH_PROXY); |
468 auth_info_->challenger = HostPortPair::FromURL(auth_origin_); | 468 auth_info_->challenger = url::Origin(auth_origin_); |
469 auth_info_->scheme = HttpAuth::SchemeToString(handler_->auth_scheme()); | 469 auth_info_->scheme = HttpAuth::SchemeToString(handler_->auth_scheme()); |
470 auth_info_->realm = handler_->realm(); | 470 auth_info_->realm = handler_->realm(); |
471 } | 471 } |
472 | 472 |
473 bool HttpAuthController::DisableOnAuthHandlerResult(int result) { | 473 bool HttpAuthController::DisableOnAuthHandlerResult(int result) { |
474 DCHECK(CalledOnValidThread()); | 474 DCHECK(CalledOnValidThread()); |
475 | 475 |
476 switch (result) { | 476 switch (result) { |
477 // Occurs with GSSAPI, if the user has not already logged in. | 477 // Occurs with GSSAPI, if the user has not already logged in. |
478 case ERR_MISSING_AUTH_CREDENTIALS: | 478 case ERR_MISSING_AUTH_CREDENTIALS: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 DCHECK(CalledOnValidThread()); | 525 DCHECK(CalledOnValidThread()); |
526 disabled_schemes_.insert(scheme); | 526 disabled_schemes_.insert(scheme); |
527 } | 527 } |
528 | 528 |
529 void HttpAuthController::DisableEmbeddedIdentity() { | 529 void HttpAuthController::DisableEmbeddedIdentity() { |
530 DCHECK(CalledOnValidThread()); | 530 DCHECK(CalledOnValidThread()); |
531 embedded_identity_used_ = true; | 531 embedded_identity_used_ = true; |
532 } | 532 } |
533 | 533 |
534 } // namespace net | 534 } // namespace net |
OLD | NEW |