Index: net/http/http_auth_controller.cc |
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc |
index ea37a41ef2da136e3b10e8f92f997229b979671e..52fd2f937e4046034eaa4464e844b72633277bfb 100644 |
--- a/net/http/http_auth_controller.cc |
+++ b/net/http/http_auth_controller.cc |
@@ -13,6 +13,7 @@ |
#include "net/base/auth.h" |
#include "net/base/net_util.h" |
#include "net/dns/host_resolver.h" |
+#include "net/http/http_auth_challenge_tokenizer.h" |
#include "net/http/http_auth_handler.h" |
#include "net/http/http_auth_handler_factory.h" |
#include "net/http/http_network_session.h" |
@@ -251,13 +252,12 @@ bool HttpAuthController::SelectPreemptiveAuth(const BoundNetLog& net_log) { |
return false; |
// Try to create a handler using the previous auth challenge. |
- scoped_ptr<HttpAuthHandler> handler_preemptive; |
- int rv_create = http_auth_handler_factory_-> |
- CreatePreemptiveAuthHandlerFromString(entry->auth_challenge(), target_, |
- auth_origin_, |
- entry->IncrementNonceCount(), |
- net_log, &handler_preemptive); |
- if (rv_create != OK) |
+ std::string challenge = entry->auth_challenge(); |
+ HttpAuthChallengeTokenizer tokenizer(challenge.begin(), challenge.end()); |
+ scoped_ptr<HttpAuthHandler> handler_preemptive = |
+ http_auth_handler_factory_->CreateAndInitPreemptiveAuthHandler( |
+ entry, tokenizer, target_, net_log); |
+ if (!handler_preemptive) |
return false; |
// Set the state |