| 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_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 ApplyProxyConfigIfAvailable(); | 1433 ApplyProxyConfigIfAvailable(); |
| 1434 } | 1434 } |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 net_log.EndEvent(NetLog::TYPE_PROXY_SERVICE); | 1437 net_log.EndEvent(NetLog::TYPE_PROXY_SERVICE); |
| 1438 return result_code; | 1438 return result_code; |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 void ProxyService::SetProxyScriptFetchers( | 1441 void ProxyService::SetProxyScriptFetchers( |
| 1442 ProxyScriptFetcher* proxy_script_fetcher, | 1442 ProxyScriptFetcher* proxy_script_fetcher, |
| 1443 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher) { | 1443 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher) { |
| 1444 DCHECK(CalledOnValidThread()); | 1444 DCHECK(CalledOnValidThread()); |
| 1445 State previous_state = ResetProxyConfig(false); | 1445 State previous_state = ResetProxyConfig(false); |
| 1446 proxy_script_fetcher_.reset(proxy_script_fetcher); | 1446 proxy_script_fetcher_.reset(proxy_script_fetcher); |
| 1447 dhcp_proxy_script_fetcher_.reset(dhcp_proxy_script_fetcher); | 1447 dhcp_proxy_script_fetcher_ = dhcp_proxy_script_fetcher.Pass(); |
| 1448 if (previous_state != STATE_NONE) | 1448 if (previous_state != STATE_NONE) |
| 1449 ApplyProxyConfigIfAvailable(); | 1449 ApplyProxyConfigIfAvailable(); |
| 1450 } | 1450 } |
| 1451 | 1451 |
| 1452 ProxyScriptFetcher* ProxyService::GetProxyScriptFetcher() const { | 1452 ProxyScriptFetcher* ProxyService::GetProxyScriptFetcher() const { |
| 1453 DCHECK(CalledOnValidThread()); | 1453 DCHECK(CalledOnValidThread()); |
| 1454 return proxy_script_fetcher_.get(); | 1454 return proxy_script_fetcher_.get(); |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 ProxyService::State ProxyService::ResetProxyConfig(bool reset_fetched_config) { | 1457 ProxyService::State ProxyService::ResetProxyConfig(bool reset_fetched_config) { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 State previous_state = ResetProxyConfig(false); | 1646 State previous_state = ResetProxyConfig(false); |
| 1647 if (previous_state != STATE_NONE) | 1647 if (previous_state != STATE_NONE) |
| 1648 ApplyProxyConfigIfAvailable(); | 1648 ApplyProxyConfigIfAvailable(); |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 void ProxyService::OnDNSChanged() { | 1651 void ProxyService::OnDNSChanged() { |
| 1652 OnIPAddressChanged(); | 1652 OnIPAddressChanged(); |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 } // namespace net | 1655 } // namespace net |
| OLD | NEW |