| 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/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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // compatibility hasn't been an issue. | 42 // compatibility hasn't been an issue. |
| 43 // | 43 // |
| 44 // For more details, also check out this comment: | 44 // For more details, also check out this comment: |
| 45 // http://code.google.com/p/chromium/issues/detail?id=18575#c20 | 45 // http://code.google.com/p/chromium/issues/detail?id=18575#c20 |
| 46 static const char kWpadUrl[] = "http://wpad/wpad.dat"; | 46 static const char kWpadUrl[] = "http://wpad/wpad.dat"; |
| 47 | 47 |
| 48 ProxyScriptDecider::ProxyScriptDecider( | 48 ProxyScriptDecider::ProxyScriptDecider( |
| 49 ProxyScriptFetcher* proxy_script_fetcher, | 49 ProxyScriptFetcher* proxy_script_fetcher, |
| 50 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, | 50 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, |
| 51 NetLog* net_log) | 51 NetLog* net_log) |
| 52 : proxy_script_fetcher_(proxy_script_fetcher), | 52 : resolver_(NULL), |
| 53 proxy_script_fetcher_(proxy_script_fetcher), |
| 53 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), | 54 dhcp_proxy_script_fetcher_(dhcp_proxy_script_fetcher), |
| 54 current_pac_source_index_(0u), | 55 current_pac_source_index_(0u), |
| 55 pac_mandatory_(false), | 56 pac_mandatory_(false), |
| 56 next_state_(STATE_NONE), | 57 next_state_(STATE_NONE), |
| 57 net_log_(BoundNetLog::Make( | 58 net_log_(BoundNetLog::Make( |
| 58 net_log, NetLog::SOURCE_PROXY_SCRIPT_DECIDER)), | 59 net_log, NetLog::SOURCE_PROXY_SCRIPT_DECIDER)), |
| 59 fetch_pac_bytes_(false) { | 60 fetch_pac_bytes_(false) { |
| 60 } | 61 } |
| 61 | 62 |
| 62 ProxyScriptDecider::~ProxyScriptDecider() { | 63 ProxyScriptDecider::~ProxyScriptDecider() { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 } | 389 } |
| 389 | 390 |
| 390 // This is safe to call in any state. | 391 // This is safe to call in any state. |
| 391 if (dhcp_proxy_script_fetcher_) | 392 if (dhcp_proxy_script_fetcher_) |
| 392 dhcp_proxy_script_fetcher_->Cancel(); | 393 dhcp_proxy_script_fetcher_->Cancel(); |
| 393 | 394 |
| 394 DidComplete(); | 395 DidComplete(); |
| 395 } | 396 } |
| 396 | 397 |
| 397 } // namespace net | 398 } // namespace net |
| OLD | NEW |