Chromium Code Reviews| Index: net/proxy/proxy_list.cc |
| diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc |
| index 1b2ecc73aef6269001dfff64e647d45499ecc5c8..eb8fed068017953c5f6b5b79c8d97e4d2a650850 100644 |
| --- a/net/proxy/proxy_list.cc |
| +++ b/net/proxy/proxy_list.cc |
| @@ -35,6 +35,10 @@ void ProxyList::Set(const std::string& proxy_uri_list) { |
| void ProxyList::SetSingleProxyServer(const ProxyServer& proxy_server) { |
| proxies_.clear(); |
| + AddProxyServer(proxy_server); |
| +} |
| + |
| +void ProxyList::AddProxyServer(const ProxyServer& proxy_server) { |
| if (proxy_server.is_valid()) |
| proxies_.push_back(proxy_server); |
| } |
| @@ -110,6 +114,13 @@ size_t ProxyList::size() const { |
| return proxies_.size(); |
| } |
| +// Returns true if |*this| lists the same proxies as |other|. |
| +bool ProxyList::Equals(const ProxyList& other) const { |
| + if (size() != other.size()) |
| + return false; |
| + return ToPacString() == other.ToPacString(); |
|
eroman
2013/02/26 01:13:50
Not ideal. I will allow it though.
marq_use_my_chromium_address
2013/02/27 23:08:19
ProxyServer has an == operator, so I can just comp
|
| +} |
| + |
| const ProxyServer& ProxyList::Get() const { |
| DCHECK(!proxies_.empty()); |
| return proxies_[0]; |