| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_config.h" | 5 #include "net/proxy/proxy_config.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/string_number_conversions.h" |
| 7 #include "base/string_tokenizer.h" | 9 #include "base/string_tokenizer.h" |
| 8 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 9 #include "net/proxy/proxy_info.h" | 11 #include "net/proxy/proxy_info.h" |
| 10 | 12 |
| 11 namespace net { | 13 namespace net { |
| 12 | 14 |
| 13 bool ProxyConfig::ProxyRules::Equals(const ProxyRules& other) const { | 15 bool ProxyConfig::ProxyRules::Equals(const ProxyRules& other) const { |
| 14 return type == other.type && | 16 return type == other.type && |
| 15 single_proxy == other.single_proxy && | 17 single_proxy == other.single_proxy && |
| 16 proxy_for_http == other.proxy_for_http && | 18 proxy_for_http == other.proxy_for_http && |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 case net::ProxyConfig::ProxyRules::TYPE_NO_RULES: | 171 case net::ProxyConfig::ProxyRules::TYPE_NO_RULES: |
| 170 type = "TYPE_NO_RULES"; | 172 type = "TYPE_NO_RULES"; |
| 171 break; | 173 break; |
| 172 case net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME: | 174 case net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME: |
| 173 type = "TYPE_PROXY_PER_SCHEME"; | 175 type = "TYPE_PROXY_PER_SCHEME"; |
| 174 break; | 176 break; |
| 175 case net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY: | 177 case net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY: |
| 176 type = "TYPE_SINGLE_PROXY"; | 178 type = "TYPE_SINGLE_PROXY"; |
| 177 break; | 179 break; |
| 178 default: | 180 default: |
| 179 type = IntToString(rules.type); | 181 type = base::IntToString(rules.type); |
| 180 break; | 182 break; |
| 181 } | 183 } |
| 182 return out << " {\n" | 184 return out << " {\n" |
| 183 << " type: " << type << "\n" | 185 << " type: " << type << "\n" |
| 184 << " single_proxy: " << rules.single_proxy << "\n" | 186 << " single_proxy: " << rules.single_proxy << "\n" |
| 185 << " proxy_for_http: " << rules.proxy_for_http << "\n" | 187 << " proxy_for_http: " << rules.proxy_for_http << "\n" |
| 186 << " proxy_for_https: " << rules.proxy_for_https << "\n" | 188 << " proxy_for_https: " << rules.proxy_for_https << "\n" |
| 187 << " proxy_for_ftp: " << rules.proxy_for_ftp << "\n" | 189 << " proxy_for_ftp: " << rules.proxy_for_ftp << "\n" |
| 188 << " socks_proxy: " << rules.socks_proxy << "\n" | 190 << " socks_proxy: " << rules.socks_proxy << "\n" |
| 189 << " }"; | 191 << " }"; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 config.proxy_rules().bypass_rules; | 238 config.proxy_rules().bypass_rules; |
| 237 net::ProxyBypassRules::RuleList::const_iterator it; | 239 net::ProxyBypassRules::RuleList::const_iterator it; |
| 238 for (it = bypass_rules.rules().begin(); | 240 for (it = bypass_rules.rules().begin(); |
| 239 it != bypass_rules.rules().end(); ++it) { | 241 it != bypass_rules.rules().end(); ++it) { |
| 240 out << "\n " << (*it)->ToString(); | 242 out << "\n " << (*it)->ToString(); |
| 241 } | 243 } |
| 242 } | 244 } |
| 243 | 245 |
| 244 return out; | 246 return out; |
| 245 } | 247 } |
| OLD | NEW |