Index: net/http/http_auth_handler_digest.cc |
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc |
index 8c8787f6500502a868c8514754cdd062c90e8cb3..b31fa5a7100581b2784550dcc36f9e0b81a354c3 100644 |
--- a/net/http/http_auth_handler_digest.cc |
+++ b/net/http/http_auth_handler_digest.cc |
@@ -106,7 +106,17 @@ HttpAuth::AuthorizationResult HttpAuthHandlerDigest::HandleAnotherChallenge( |
HttpAuth::AUTHORIZATION_RESULT_REJECT; |
} |
-int HttpAuthHandlerDigest::Init(const HttpAuthChallengeTokenizer& challenge) { |
+int HttpAuthHandlerDigest::InitializeFromChallengeInternal( |
+ const HttpAuthChallengeTokenizer& challenge, |
+ const HttpResponseInfo&, |
+ const CompletionCallback&) { |
+ return ParseChallenge(challenge) ? OK : ERR_INVALID_RESPONSE; |
+} |
+ |
+int HttpAuthHandlerDigest::InitializeFromCacheEntryInternal( |
+ HttpAuthCache::Entry* cache_entry) { |
+ HttpAuthChallengeTokenizer challenge(cache_entry->auth_challenge().begin(), |
+ cache_entry->auth_challenge().end()); |
return ParseChallenge(challenge) ? OK : ERR_INVALID_RESPONSE; |
} |
@@ -372,15 +382,13 @@ HttpAuthHandlerDigest::Factory::CreateAuthHandlerForScheme( |
scoped_ptr<HttpAuthHandler> |
HttpAuthHandlerDigest::Factory::CreateAndInitPreemptiveAuthHandler( |
HttpAuthCache::Entry* cache_entry, |
- const HttpAuthChallengeTokenizer& tokenizer, |
HttpAuth::Target target, |
const BoundNetLog& net_log) { |
if (cache_entry->scheme() != kDigestSchemeName) |
return scoped_ptr<HttpAuthHandler>(); |
scoped_ptr<HttpAuthHandler> handler(new HttpAuthHandlerDigest( |
cache_entry->IncrementNonceCount(), nonce_generator_.get())); |
- int rv = handler->HandleInitialChallenge(tokenizer, target, |
- cache_entry->origin(), net_log); |
+ int rv = handler->InitializeFromCacheEntry(cache_entry, target, net_log); |
if (rv == OK) |
return handler; |
return scoped_ptr<HttpAuthHandler>(); |