summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_controller.cc
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-13 20:45:31 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-13 20:45:31 +0000
commit560c0431ae36b3c115aad89a014a5fcbb296f420 (patch)
treecc0ca213d15e01e8278988e9ace989624c8babdb /net/http/http_auth_controller.cc
parent64bff312f36572a45a331aab9d6e82e7c03a5d6d (diff)
downloadchromium_src-560c0431ae36b3c115aad89a014a5fcbb296f420.zip
chromium_src-560c0431ae36b3c115aad89a014a5fcbb296f420.tar.gz
chromium_src-560c0431ae36b3c115aad89a014a5fcbb296f420.tar.bz2
Remove |net_log_| as a class member and pass it in where needed and a little cleanup.
BUG=42795 TEST=existing unit tests Review URL: http://codereview.chromium.org/2806052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_controller.cc')
-rw-r--r--net/http/http_auth_controller.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 22b4f20..0392741 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -50,23 +50,22 @@ std::string AuthChallengeLogMessage(HttpResponseHeaders* headers) {
HttpAuthController::HttpAuthController(
HttpAuth::Target target,
const GURL& auth_url,
- scoped_refptr<HttpNetworkSession> session,
- const BoundNetLog& net_log)
+ scoped_refptr<HttpNetworkSession> session)
: target_(target),
auth_url_(auth_url),
auth_origin_(auth_url.GetOrigin()),
auth_path_(HttpAuth::AUTH_PROXY ? std::string() : auth_url.path()),
embedded_identity_used_(false),
default_credentials_used_(false),
- session_(session),
- net_log_(net_log) {
+ session_(session) {
}
HttpAuthController::~HttpAuthController() {}
int HttpAuthController::MaybeGenerateAuthToken(const HttpRequestInfo* request,
- CompletionCallback* callback) {
- bool needs_auth = HaveAuth() || SelectPreemptiveAuth();
+ CompletionCallback* callback,
+ const BoundNetLog& net_log) {
+ bool needs_auth = HaveAuth() || SelectPreemptiveAuth(net_log);
if (!needs_auth)
return OK;
const std::wstring* username = NULL;
@@ -80,7 +79,7 @@ int HttpAuthController::MaybeGenerateAuthToken(const HttpRequestInfo* request,
&auth_token_);
}
-bool HttpAuthController::SelectPreemptiveAuth() {
+bool HttpAuthController::SelectPreemptiveAuth(const BoundNetLog& net_log) {
DCHECK(!HaveAuth());
DCHECK(identity_.invalid);
@@ -104,7 +103,7 @@ bool HttpAuthController::SelectPreemptiveAuth() {
CreatePreemptiveAuthHandlerFromString(entry->auth_challenge(), target_,
auth_origin_,
entry->IncrementNonceCount(),
- net_log_, &handler_preemptive);
+ net_log, &handler_preemptive);
if (rv_create != OK)
return false;
@@ -129,7 +128,8 @@ void HttpAuthController::AddAuthorizationHeader(
int HttpAuthController::HandleAuthChallenge(
scoped_refptr<HttpResponseHeaders> headers,
bool do_not_send_server_auth,
- bool establishing_tunnel) {
+ bool establishing_tunnel,
+ const BoundNetLog& net_log) {
DCHECK(headers);
DCHECK(auth_origin_.is_valid());
@@ -155,7 +155,7 @@ int HttpAuthController::HandleAuthChallenge(
if (target_ != HttpAuth::AUTH_SERVER || !do_not_send_server_auth) {
// Find the best authentication challenge that we support.
HttpAuth::ChooseBestChallenge(session_->http_auth_handler_factory(),
- headers, target_, auth_origin_, net_log_,
+ headers, target_, auth_origin_, net_log,
&handler_);
}