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 #include "net/proxy/proxy_retry_info.h" 8 9 namespace net { 10 ProxyInfo()11ProxyInfo::ProxyInfo() : config_id_(ProxyConfig::INVALID_ID) { 12 } 13 ~ProxyInfo()14ProxyInfo::~ProxyInfo() { 15 } 16 Use(const ProxyInfo & other)17void ProxyInfo::Use(const ProxyInfo& other) { 18 proxy_list_ = other.proxy_list_; 19 } 20 UseDirect()21void ProxyInfo::UseDirect() { 22 proxy_list_.SetSingleProxyServer(ProxyServer::Direct()); 23 } 24 UseNamedProxy(const std::string & proxy_uri_list)25void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) { 26 proxy_list_.Set(proxy_uri_list); 27 } 28 UseProxyServer(const ProxyServer & proxy_server)29void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) { 30 proxy_list_.SetSingleProxyServer(proxy_server); 31 } 32 ToPacString() const33std::string ProxyInfo::ToPacString() const { 34 return proxy_list_.ToPacString(); 35 } 36 Fallback(ProxyRetryInfoMap * proxy_retry_info)37bool ProxyInfo::Fallback(ProxyRetryInfoMap* proxy_retry_info) { 38 return proxy_list_.Fallback(proxy_retry_info); 39 } 40 DeprioritizeBadProxies(const ProxyRetryInfoMap & proxy_retry_info)41void ProxyInfo::DeprioritizeBadProxies( 42 const ProxyRetryInfoMap& proxy_retry_info) { 43 proxy_list_.DeprioritizeBadProxies(proxy_retry_info); 44 } 45 RemoveProxiesWithoutScheme(int scheme_bit_field)46void ProxyInfo::RemoveProxiesWithoutScheme(int scheme_bit_field) { 47 proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field); 48 } 49 50 } // namespace net 51