OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_auth_handler_factory.h" | 5 #include "net/http/http_auth_handler_factory.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/http/http_auth_filter.h" | 10 #include "net/http/http_auth_filter.h" |
11 #include "net/http/http_auth_handler_basic.h" | 11 #include "net/http/http_auth_handler_basic.h" |
12 #include "net/http/http_auth_handler_digest.h" | 12 #include "net/http/http_auth_handler_digest.h" |
| 13 #include "net/http/http_auth_handler_ntlm.h" |
| 14 |
13 #if defined(USE_KERBEROS) | 15 #if defined(USE_KERBEROS) |
14 #include "net/http/http_auth_handler_negotiate.h" | 16 #include "net/http/http_auth_handler_negotiate.h" |
15 #endif | 17 #endif |
16 #include "net/http/http_auth_handler_ntlm.h" | |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 | 20 |
20 int HttpAuthHandlerFactory::CreateAuthHandlerFromString( | 21 int HttpAuthHandlerFactory::CreateAuthHandlerFromString( |
21 const std::string& challenge, | 22 const std::string& challenge, |
22 HttpAuth::Target target, | 23 HttpAuth::Target target, |
23 const GURL& origin, | 24 const GURL& origin, |
24 const BoundNetLog& net_log, | 25 const BoundNetLog& net_log, |
25 scoped_ptr<HttpAuthHandler>* handler) { | 26 scoped_ptr<HttpAuthHandler>* handler) { |
26 HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end()); | 27 HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end()); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 if (it == factory_map_.end()) { | 189 if (it == factory_map_.end()) { |
189 handler->reset(); | 190 handler->reset(); |
190 return ERR_UNSUPPORTED_AUTH_SCHEME; | 191 return ERR_UNSUPPORTED_AUTH_SCHEME; |
191 } | 192 } |
192 DCHECK(it->second); | 193 DCHECK(it->second); |
193 return it->second->CreateAuthHandler(challenge, target, origin, reason, | 194 return it->second->CreateAuthHandler(challenge, target, origin, reason, |
194 digest_nonce_count, net_log, handler); | 195 digest_nonce_count, net_log, handler); |
195 } | 196 } |
196 | 197 |
197 } // namespace net | 198 } // namespace net |
OLD | NEW |