diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 06:36:58 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-25 06:36:58 +0000 |
commit | 31e68d79c7a0ee90d6de5f8fd26b72a7b35bdd2e (patch) | |
tree | 884da7cd68797bda1109b596355a2ec2c1647561 /net/proxy/proxy_server.h | |
parent | 7a6a4b3a5b233bb2eae6cec674d90ac858d1a9e7 (diff) | |
download | chromium_src-31e68d79c7a0ee90d6de5f8fd26b72a7b35bdd2e.zip chromium_src-31e68d79c7a0ee90d6de5f8fd26b72a7b35bdd2e.tar.gz chromium_src-31e68d79c7a0ee90d6de5f8fd26b72a7b35bdd2e.tar.bz2 |
Refactor: change the spdy session pool key to take a ProxyServer instead of a string representation of the proxy server.
BUG=52668
Review URL: http://codereview.chromium.org/3197018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server.h')
-rw-r--r-- | net/proxy/proxy_server.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/proxy/proxy_server.h b/net/proxy/proxy_server.h index 689fd6b..dea910e 100644 --- a/net/proxy/proxy_server.h +++ b/net/proxy/proxy_server.h @@ -132,6 +132,13 @@ class ProxyServer { host_port_pair_.Equals(other.host_port_pair_); } + // Comparator function so this can be placed in a std::map. + bool operator<(const ProxyServer& other) const { + if (scheme_ != other.scheme_) + return scheme_ < other.scheme_; + return host_port_pair_ < other.host_port_pair_; + } + private: // Creates a ProxyServer given a scheme, and host/port string. If parsing the // host/port string fails, the returned instance will be invalid. |