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

Unified Diff: net/http/http_auth_controller.cc

Issue 1393693002: [net/http auth] Split HttpAuthHandler creation from initialization. Base URL: https://chromium.googlesource.com/chromium/src.git@rename-auth-handler-methods
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_cache_unittest.cc ('k') | net/http/http_auth_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/http/http_auth_cache_unittest.cc ('k') | net/http/http_auth_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698