| Index: net/proxy/proxy_list.cc
|
| diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
|
| index 1b2ecc73aef6269001dfff64e647d45499ecc5c8..4a4950119fcbdcc505231ea899c9d01b1f25fd7a 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 proxies_ == other.proxies_;
|
| +}
|
| +
|
| const ProxyServer& ProxyList::Get() const {
|
| DCHECK(!proxies_.empty());
|
| return proxies_[0];
|
|
|