OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ntlm.h" | 5 #include "net/http/http_auth_handler_ntlm.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 // For gethostname | 8 // For gethostname |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 return rv; | 711 return rv; |
712 } | 712 } |
713 | 713 |
714 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( | 714 int HttpAuthHandlerNTLM::Factory::CreateAuthHandler( |
715 HttpAuthChallengeTokenizer* challenge, | 715 HttpAuthChallengeTokenizer* challenge, |
716 HttpAuth::Target target, | 716 HttpAuth::Target target, |
717 const SSLInfo& ssl_info, | 717 const SSLInfo& ssl_info, |
718 const GURL& origin, | 718 const GURL& origin, |
719 CreateReason reason, | 719 CreateReason reason, |
720 int digest_nonce_count, | 720 int digest_nonce_count, |
721 const BoundNetLog& net_log, | 721 const NetLogWithSource& net_log, |
722 std::unique_ptr<HttpAuthHandler>* handler) { | 722 std::unique_ptr<HttpAuthHandler>* handler) { |
723 if (reason == CREATE_PREEMPTIVE) | 723 if (reason == CREATE_PREEMPTIVE) |
724 return ERR_UNSUPPORTED_AUTH_SCHEME; | 724 return ERR_UNSUPPORTED_AUTH_SCHEME; |
725 // TODO(cbentzel): Move towards model of parsing in the factory | 725 // TODO(cbentzel): Move towards model of parsing in the factory |
726 // method and only constructing when valid. | 726 // method and only constructing when valid. |
727 // NOTE: Default credentials are not supported for the portable implementation | 727 // NOTE: Default credentials are not supported for the portable implementation |
728 // of NTLM. | 728 // of NTLM. |
729 std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); | 729 std::unique_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); |
730 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin, | 730 if (!tmp_handler->InitFromChallenge(challenge, target, ssl_info, origin, |
731 net_log)) | 731 net_log)) |
732 return ERR_INVALID_RESPONSE; | 732 return ERR_INVALID_RESPONSE; |
733 handler->swap(tmp_handler); | 733 handler->swap(tmp_handler); |
734 return OK; | 734 return OK; |
735 } | 735 } |
736 | 736 |
737 } // namespace net | 737 } // namespace net |
OLD | NEW |