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

Side by Side Diff: net/http/http_auth_controller.cc

Issue 2067933002: Use correct origin when prompting for proxy authentication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_shell build. Created 4 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « net/base/auth.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/base/auth.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698