Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: net/base/host_port_pair.h

Issue 1808001: Implement a 15 connection per proxy server limit. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Remove extra newline. Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_session.h » ('j') | net/http/http_network_session.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_port_pair.h
diff --git a/net/base/host_port_pair.h b/net/base/host_port_pair.h
index 547e8982ec50b287a770c99c4bec4860bd876905..35d244ef2425025854573d9bee36b5a71ddcb082 100644
--- a/net/base/host_port_pair.h
+++ b/net/base/host_port_pair.h
@@ -15,11 +15,12 @@ struct HostPortPair {
// If |in_host| represents an IPv6 address, it should not bracket the address.
HostPortPair(const std::string& in_host, uint16 in_port);
+ // TODO(willchan): Define a functor instead.
// Comparator function so this can be placed in a std::map.
bool operator<(const HostPortPair& other) const {
- if (host != other.host)
- return host < other.host;
- return port < other.port;
+ if (port != other.port)
+ return port < other.port;
+ return host < other.host;
}
// ToString() will convert the HostPortPair to "host:port". If |host| is an
« no previous file with comments | « no previous file | net/http/http_network_session.h » ('j') | net/http/http_network_session.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698