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

Unified Diff: net/http/http_auth_handler.cc

Issue 1391053002: [net/http auth] Make HttpAuthHandler challenge handling asynchronous. Base URL: https://chromium.googlesource.com/chromium/src.git@auth-handler-init-split
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 d9c114c8506b8f939472444009d556fd03c36993..fe6d49fe1ea2c5f148631ad7c4f0cbd34a8a2cca 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -21,15 +21,28 @@ HttpAuthHandler::~HttpAuthHandler() {
int HttpAuthHandler::HandleInitialChallenge(
const HttpAuthChallengeTokenizer& challenge,
+ const HttpResponseInfo& response_info,
HttpAuth::Target target,
const GURL& origin,
- const BoundNetLog& net_log) {
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) {
origin_ = origin;
target_ = target;
net_log_ = net_log;
auth_challenge_ = challenge.challenge_text();
- return Init(challenge);
+ return InitializeFromChallengeInternal(challenge, response_info, callback);
+}
+
+int HttpAuthHandler::InitializeFromCacheEntry(HttpAuthCache::Entry* cache_entry,
+ HttpAuth::Target target,
+ const BoundNetLog& net_log) {
+ origin_ = cache_entry->origin();
+ target_ = target;
+ net_log_ = net_log;
+
+ auth_challenge_ = cache_entry->auth_challenge();
+ return InitializeFromCacheEntryInternal(cache_entry);
}
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