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/proxy/proxy_script_decider.h" | 5 #include "net/proxy/proxy_script_decider.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 ProxyScriptDecider::ProxyScriptDecider( | 82 ProxyScriptDecider::ProxyScriptDecider( |
83 ProxyScriptFetcher* proxy_script_fetcher, | 83 ProxyScriptFetcher* proxy_script_fetcher, |
84 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, | 84 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, |
85 NetLog* net_log) | 85 NetLog* net_log) |
86 : proxy_script_fetcher_(proxy_script_fetcher), | 86 : proxy_script_fetcher_(proxy_script_fetcher), |
87 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), | 87 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), |
88 current_pac_source_index_(0u), | 88 current_pac_source_index_(0u), |
89 pac_mandatory_(false), | 89 pac_mandatory_(false), |
90 next_state_(STATE_NONE), | 90 next_state_(STATE_NONE), |
91 net_log_( | 91 net_log_(NetLogWithSource::Make(net_log, |
92 BoundNetLog::Make(net_log, NetLogSourceType::PROXY_SCRIPT_DECIDER)), | 92 NetLogSourceType::PROXY_SCRIPT_DECIDER)), |
93 fetch_pac_bytes_(false), | 93 fetch_pac_bytes_(false), |
94 quick_check_enabled_(true), | 94 quick_check_enabled_(true), |
95 host_resolver_(nullptr) { | 95 host_resolver_(nullptr) { |
96 if (proxy_script_fetcher && | 96 if (proxy_script_fetcher && |
97 proxy_script_fetcher->GetRequestContext() && | 97 proxy_script_fetcher->GetRequestContext() && |
98 proxy_script_fetcher->GetRequestContext()->host_resolver()) { | 98 proxy_script_fetcher->GetRequestContext()->host_resolver()) { |
99 host_resolver_ = proxy_script_fetcher->GetRequestContext()->host_resolver(); | 99 host_resolver_ = proxy_script_fetcher->GetRequestContext()->host_resolver(); |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 } | 475 } |
476 | 476 |
477 // This is safe to call in any state. | 477 // This is safe to call in any state. |
478 if (dhcp_proxy_script_fetcher_) | 478 if (dhcp_proxy_script_fetcher_) |
479 dhcp_proxy_script_fetcher_->Cancel(); | 479 dhcp_proxy_script_fetcher_->Cancel(); |
480 | 480 |
481 DidComplete(); | 481 DidComplete(); |
482 } | 482 } |
483 | 483 |
484 } // namespace net | 484 } // namespace net |
OLD | NEW |