| 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_negotiate.h" | 5 #include "net/http/http_auth_handler_negotiate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "net/base/address_family.h" | 11 #include "net/base/address_family.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/dns/host_resolver.h" | 13 #include "net/dns/host_resolver.h" |
| 14 #include "net/dns/single_request_host_resolver.h" | 14 #include "net/dns/single_request_host_resolver.h" |
| 15 #include "net/http/http_auth_filter.h" | 15 #include "net/http/http_auth_filter.h" |
| 16 #include "net/http/url_security_manager.h" | 16 #include "net/http/url_security_manager.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 HttpAuthHandlerNegotiate::Factory::Factory() | 20 HttpAuthHandlerNegotiate::Factory::Factory() |
| 21 : disable_cname_lookup_(false), | 21 : disable_cname_lookup_(false), |
| 22 use_port_(false), | 22 use_port_(false), |
| 23 resolver_(NULL), | 23 resolver_(NULL), |
| 24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 25 max_token_length_(0), | 25 max_token_length_(0), |
| 26 first_creation_(true), | |
| 27 #endif | 26 #endif |
| 28 is_unsupported_(false) { | 27 is_unsupported_(false) { |
| 29 } | 28 } |
| 30 | 29 |
| 31 HttpAuthHandlerNegotiate::Factory::~Factory() { | 30 HttpAuthHandlerNegotiate::Factory::~Factory() { |
| 32 } | 31 } |
| 33 | 32 |
| 34 void HttpAuthHandlerNegotiate::Factory::set_host_resolver( | 33 void HttpAuthHandlerNegotiate::Factory::set_host_resolver( |
| 35 HostResolver* resolver) { | 34 HostResolver* resolver) { |
| 36 resolver_ = resolver; | 35 resolver_ = resolver; |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 bool HttpAuthHandlerNegotiate::CanDelegate() const { | 327 bool HttpAuthHandlerNegotiate::CanDelegate() const { |
| 329 // TODO(cbentzel): Should delegation be allowed on proxies? | 328 // TODO(cbentzel): Should delegation be allowed on proxies? |
| 330 if (target_ == HttpAuth::AUTH_PROXY) | 329 if (target_ == HttpAuth::AUTH_PROXY) |
| 331 return false; | 330 return false; |
| 332 if (!url_security_manager_) | 331 if (!url_security_manager_) |
| 333 return false; | 332 return false; |
| 334 return url_security_manager_->CanDelegate(origin_); | 333 return url_security_manager_->CanDelegate(origin_); |
| 335 } | 334 } |
| 336 | 335 |
| 337 } // namespace net | 336 } // namespace net |
| OLD | NEW |