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

Unified Diff: net/http/http_auth.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 | « no previous file | net/http/http_auth_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth.cc
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index 77b5bdcf472390eaa6d263f035832e64d205ccf4..295a988b5bc58c6ba2a4400292bcf415ab276ede 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -108,9 +108,16 @@ void HttpAuth::ChooseBestChallenge(
// rare. Servers typically specify higher priority schemes before lower
// priority schemes.
scoped_ptr<HttpAuthHandler> current_handler;
- int rv = http_auth_handler_factory->CreateAuthHandler(
- challenge_tokenizer, target, origin,
- HttpAuthHandlerFactory::CREATE_CHALLENGE, 1, net_log, &current_handler);
+ current_handler = http_auth_handler_factory->CreateAuthHandlerForScheme(
+ challenge_tokenizer.NormalizedScheme());
+ if (!current_handler) {
+ net_log.AddEvent(NetLog::TYPE_AUTH_HANDLER_CREATION_FAILURE,
+ base::Bind(&AuthHandlerCreationFailureParams,
+ &cur_challenge, ERR_UNSUPPORTED_AUTH_SCHEME));
+ continue;
+ }
+ int rv = current_handler->HandleInitialChallenge(challenge_tokenizer,
+ target, origin, net_log);
if (rv != OK) {
net_log.AddEvent(
NetLog::TYPE_AUTH_HANDLER_CREATION_FAILURE,
« no previous file with comments | « no previous file | net/http/http_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698