| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_info.h" | 5 #include "net/proxy/proxy_info.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 ProxyInfo::ProxyInfo() | 9 ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::INVALID_ID) { |
| 10 : config_id_(ProxyConfig::INVALID_ID), | |
| 11 config_was_tried_(false) { | |
| 12 } | 10 } |
| 13 | 11 |
| 14 void ProxyInfo::Use(const ProxyInfo& other) { | 12 void ProxyInfo::Use(const ProxyInfo& other) { |
| 15 proxy_list_ = other.proxy_list_; | 13 proxy_list_ = other.proxy_list_; |
| 16 } | 14 } |
| 17 | 15 |
| 18 void ProxyInfo::UseDirect() { | 16 void ProxyInfo::UseDirect() { |
| 19 proxy_list_.Set(std::string()); | 17 proxy_list_.SetSingleProxyServer(ProxyServer::Direct()); |
| 20 } | 18 } |
| 21 | 19 |
| 22 void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) { | 20 void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) { |
| 23 proxy_list_.Set(proxy_uri_list); | 21 proxy_list_.Set(proxy_uri_list); |
| 24 } | 22 } |
| 25 | 23 |
| 26 void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) { | 24 void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) { |
| 27 proxy_list_.SetSingleProxyServer(proxy_server); | 25 proxy_list_.SetSingleProxyServer(proxy_server); |
| 28 } | 26 } |
| 29 | 27 |
| 30 std::string ProxyInfo::ToPacString() { | 28 std::string ProxyInfo::ToPacString() { |
| 31 return proxy_list_.ToPacString(); | 29 return proxy_list_.ToPacString(); |
| 32 } | 30 } |
| 33 | 31 |
| 34 } // namespace net | 32 } // namespace net |
| OLD | NEW |