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

Unified Diff: net/http/http_auth_handler.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_handler.h ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler.cc
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index 32028c247d159bd5bbc24ac3b7cc1f0064f2649f..d9c114c8506b8f939472444009d556fd03c36993 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -13,7 +13,8 @@
namespace net {
-HttpAuthHandler::HttpAuthHandler() : target_(HttpAuth::AUTH_NONE) {}
+HttpAuthHandler::HttpAuthHandler(const std::string& scheme)
+ : auth_scheme_(scheme), target_(HttpAuth::AUTH_NONE) {}
HttpAuthHandler::~HttpAuthHandler() {
}
@@ -28,13 +29,7 @@ int HttpAuthHandler::HandleInitialChallenge(
net_log_ = net_log;
auth_challenge_ = challenge.challenge_text();
- int result = Init(challenge);
-
- // Init() is expected to set the scheme, realm, score, and properties. The
- // realm may be empty.
- DCHECK_IMPLIES(result == OK, HttpAuth::IsValidNormalizedScheme(auth_scheme_));
-
- return result;
+ return Init(challenge);
}
namespace {
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698