summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_info.cc
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 01:03:23 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 01:03:23 +0000
commit5b45aec04af2be235787c81369c77d627ebd639a (patch)
treeaf51655c9ca9374181722a96514f9b827cdceb34 /net/proxy/proxy_info.cc
parent6dd6c74b945802513e94b4be1012ccfbe240f023 (diff)
downloadchromium_src-5b45aec04af2be235787c81369c77d627ebd639a.zip
chromium_src-5b45aec04af2be235787c81369c77d627ebd639a.tar.gz
chromium_src-5b45aec04af2be235787c81369c77d627ebd639a.tar.bz2
Extract the parsing of proxy rules to ProxyConfig::ProxyRules, and unit-test.
This avoids re-parsing the rules every time a proxy resolve is done, and also adds extra tolerance for white space. The other motivation is to not have to fiddle around with strings as much in the various ProxyConfigServceXXXX implementations. Review URL: http://codereview.chromium.org/57011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_info.cc')
-rw-r--r--net/proxy/proxy_info.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/proxy/proxy_info.cc b/net/proxy/proxy_info.cc
index 59734cf..98ca42f 100644
--- a/net/proxy/proxy_info.cc
+++ b/net/proxy/proxy_info.cc
@@ -23,6 +23,10 @@ void ProxyInfo::UseNamedProxy(const std::string& proxy_uri_list) {
proxy_list_.Set(proxy_uri_list);
}
+void ProxyInfo::UseProxyServer(const ProxyServer& proxy_server) {
+ proxy_list_.SetSingleProxyServer(proxy_server);
+}
+
std::string ProxyInfo::ToPacString() {
return proxy_list_.ToPacString();
}