| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, | 81 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, |
| 82 NetLog* net_log) | 82 NetLog* net_log) |
| 83 : proxy_script_fetcher_(proxy_script_fetcher), | 83 : proxy_script_fetcher_(proxy_script_fetcher), |
| 84 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), | 84 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), |
| 85 current_pac_source_index_(0u), | 85 current_pac_source_index_(0u), |
| 86 pac_mandatory_(false), | 86 pac_mandatory_(false), |
| 87 next_state_(STATE_NONE), | 87 next_state_(STATE_NONE), |
| 88 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_PROXY_SCRIPT_DECIDER)), | 88 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_PROXY_SCRIPT_DECIDER)), |
| 89 fetch_pac_bytes_(false), | 89 fetch_pac_bytes_(false), |
| 90 quick_check_enabled_(true) { | 90 quick_check_enabled_(true) { |
| 91 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455942 is fixed. |
| 92 tracked_objects::ScopedTracker tracking_profile( |
| 93 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 94 "455942 ProxyScriptDecider::ProxyScriptDecider")); |
| 91 if (proxy_script_fetcher && | 95 if (proxy_script_fetcher && |
| 92 proxy_script_fetcher->GetRequestContext() && | 96 proxy_script_fetcher->GetRequestContext() && |
| 93 proxy_script_fetcher->GetRequestContext()->host_resolver()) { | 97 proxy_script_fetcher->GetRequestContext()->host_resolver()) { |
| 94 host_resolver_.reset(new SingleRequestHostResolver( | 98 host_resolver_.reset(new SingleRequestHostResolver( |
| 95 proxy_script_fetcher->GetRequestContext()->host_resolver())); | 99 proxy_script_fetcher->GetRequestContext()->host_resolver())); |
| 96 } | 100 } |
| 97 } | 101 } |
| 98 | 102 |
| 99 ProxyScriptDecider::~ProxyScriptDecider() { | 103 ProxyScriptDecider::~ProxyScriptDecider() { |
| 100 if (next_state_ != STATE_NONE) | 104 if (next_state_ != STATE_NONE) |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 481 } |
| 478 | 482 |
| 479 // This is safe to call in any state. | 483 // This is safe to call in any state. |
| 480 if (dhcp_proxy_script_fetcher_) | 484 if (dhcp_proxy_script_fetcher_) |
| 481 dhcp_proxy_script_fetcher_->Cancel(); | 485 dhcp_proxy_script_fetcher_->Cancel(); |
| 482 | 486 |
| 483 DidComplete(); | 487 DidComplete(); |
| 484 } | 488 } |
| 485 | 489 |
| 486 } // namespace net | 490 } // namespace net |
| OLD | NEW |