| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if !defined(NTLM_SSPI) | 7 #if !defined(NTLM_SSPI) |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #endif | 9 #endif |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 if (initial_challenge) | 126 if (initial_challenge) |
| 127 return HttpAuth::AUTHORIZATION_RESULT_INVALID; | 127 return HttpAuth::AUTHORIZATION_RESULT_INVALID; |
| 128 } | 128 } |
| 129 | 129 |
| 130 auth_data_ = base64_param; | 130 auth_data_ = base64_param; |
| 131 return HttpAuth::AUTHORIZATION_RESULT_ACCEPT; | 131 return HttpAuth::AUTHORIZATION_RESULT_ACCEPT; |
| 132 #endif // defined(NTLM_SSPI) | 132 #endif // defined(NTLM_SSPI) |
| 133 } | 133 } |
| 134 | 134 |
| 135 // static | 135 // static |
| 136 std::string HttpAuthHandlerNTLM::CreateSPN(const GURL& origin) { | 136 std::string HttpAuthHandlerNTLM::CreateSPN(const url::Origin& origin) { |
| 137 // The service principal name of the destination server. See | 137 // The service principal name of the destination server. See |
| 138 // http://msdn.microsoft.com/en-us/library/ms677949%28VS.85%29.aspx | 138 // http://msdn.microsoft.com/en-us/library/ms677949%28VS.85%29.aspx |
| 139 std::string target("HTTP/"); | 139 std::string target("HTTP/"); |
| 140 target.append(GetHostAndPort(origin)); | 140 target.append(GetHostAndPort(origin)); |
| 141 return target; | 141 return target; |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace net | 144 } // namespace net |
| OLD | NEW |