| 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() : config_id_(ProxyConfig::INVALID_ID) { | 9 ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::INVALID_ID) { |
| 10 } | 10 } |
| 11 | 11 |
| 12 void ProxyInfo::Use(const ProxyInfo& other) { | 12 void ProxyInfo::Use(const ProxyInfo& other) { |
| 13 proxy_list_ = other.proxy_list_; | 13 proxy_list_ = other.proxy_list_; |
| 14 } | 14 } |
| 15 | 15 |
| 16 void ProxyInfo::UseDirect() { | 16 void ProxyInfo::UseDirect() { |
| 17 proxy_list_.SetSingleProxyServer(ProxyServer::Direct()); | 17 proxy_list_.SetSingleProxyServer(ProxyServer::Direct()); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) { | 20 void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) { |
| 21 proxy_list_.Set(proxy_uri_list); | 21 proxy_list_.Set(proxy_uri_list); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) { | 24 void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) { |
| 25 proxy_list_.SetSingleProxyServer(proxy_server); | 25 proxy_list_.SetSingleProxyServer(proxy_server); |
| 26 } | 26 } |
| 27 | 27 |
| 28 std::string ProxyInfo::ToPacString() { | 28 std::string ProxyInfo::ToPacString() const { |
| 29 return proxy_list_.ToPacString(); | 29 return proxy_list_.ToPacString(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // namespace net | 32 } // namespace net |
| OLD | NEW |