| Index: net/http/http_auth_handler_ntlm_portable.cc
|
| diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc
|
| index 5bc03877af32be911e437337c9b2075cb8610adf..5a1d82ec86666db4faf82cac8d433cf2c91c6e83 100644
|
| --- a/net/http/http_auth_handler_ntlm_portable.cc
|
| +++ b/net/http/http_auth_handler_ntlm_portable.cc
|
| @@ -635,8 +635,7 @@ HttpAuthHandlerNTLM::generate_random_proc_ = GenerateRandom;
|
| HttpAuthHandlerNTLM::HostNameProc
|
| HttpAuthHandlerNTLM::get_host_name_proc_ = GetHostName;
|
|
|
| -HttpAuthHandlerNTLM::HttpAuthHandlerNTLM() {
|
| -}
|
| +HttpAuthHandlerNTLM::HttpAuthHandlerNTLM() : HttpAuthHandler("ntlm") {}
|
|
|
| bool HttpAuthHandlerNTLM::NeedsIdentity() {
|
| // This gets called for each round-trip. Only require identity on
|
| @@ -710,26 +709,16 @@ int HttpAuthHandlerNTLM::GetNextToken(const void* in_token,
|
| return rv;
|
| }
|
|
|
| -int HttpAuthHandlerNTLM::Factory::CreateAuthHandler(
|
| - const HttpAuthChallengeTokenizer& challenge,
|
| - HttpAuth::Target target,
|
| - const GURL& origin,
|
| - CreateReason reason,
|
| - int digest_nonce_count,
|
| - const BoundNetLog& net_log,
|
| - scoped_ptr<HttpAuthHandler>* handler) {
|
| - if (reason == CREATE_PREEMPTIVE)
|
| - return ERR_UNSUPPORTED_AUTH_SCHEME;
|
| - // TODO(cbentzel): Move towards model of parsing in the factory
|
| - // method and only constructing when valid.
|
| - // NOTE: Default credentials are not supported for the portable implementation
|
| - // of NTLM.
|
| - scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM);
|
| - int result =
|
| - tmp_handler->HandleInitialChallenge(challenge, target, origin, net_log);
|
| - if (result == OK)
|
| - handler->swap(tmp_handler);
|
| - return result;
|
| +scoped_ptr<HttpAuthHandler>
|
| +HttpAuthHandlerNTLM::Factory::CreateAuthHandlerForScheme(
|
| + const std::string& scheme) {
|
| + DCHECK(HttpAuth::IsValidNormalizedScheme(scheme));
|
| + if (scheme != "ntlm")
|
| + return scoped_ptr<HttpAuthHandler>();
|
| + // TODO(cbentzel): Move towards model of parsing in the factory method and
|
| + // only constructing when valid. NOTE: Default credentials are not supported
|
| + // for the portable implementation of NTLM.
|
| + return make_scoped_ptr(new HttpAuthHandlerNTLM);
|
| }
|
|
|
| } // namespace net
|
|
|