• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "net/proxy/proxy_info.h"
6 
7 namespace net {
8 
ProxyInfo()9 ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::INVALID_ID) {
10 }
11 
Use(const ProxyInfo & other)12 void ProxyInfo::Use(const ProxyInfo& other) {
13   proxy_list_ = other.proxy_list_;
14 }
15 
UseDirect()16 void ProxyInfo::UseDirect() {
17   proxy_list_.SetSingleProxyServer(ProxyServer::Direct());
18 }
19 
UseNamedProxy(const std::string & proxy_uri_list)20 void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) {
21   proxy_list_.Set(proxy_uri_list);
22 }
23 
UseProxyServer(const ProxyServer & proxy_server)24 void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) {
25   proxy_list_.SetSingleProxyServer(proxy_server);
26 }
27 
ToPacString() const28 std::string ProxyInfo::ToPacString() const {
29   return proxy_list_.ToPacString();
30 }
31 
32 }  // namespace net
33