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

Unified Diff: net/base/host_port_pair.h

Issue 1755005: SPDY: Fix Alternate-Protocol. (Closed)
Patch Set: Address mbelshe's comments. 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/base/host_port_pair.cc » ('j') | no next file with comments »
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 ab7f3120de51cb22c871718acdddc718d090a138..547e8982ec50b287a770c99c4bec4860bd876905 100644
--- a/net/base/host_port_pair.h
+++ b/net/base/host_port_pair.h
@@ -11,9 +11,9 @@
namespace net {
struct HostPortPair {
- HostPortPair() {}
- HostPortPair(const std::string& in_host, uint16 in_port)
- : host(in_host), port(in_port) {}
+ HostPortPair();
+ // If |in_host| represents an IPv6 address, it should not bracket the address.
+ HostPortPair(const std::string& in_host, uint16 in_port);
// Comparator function so this can be placed in a std::map.
bool operator<(const HostPortPair& other) const {
@@ -22,8 +22,12 @@ struct HostPortPair {
return port < other.port;
}
+ // ToString() will convert the HostPortPair to "host:port". If |host| is an
+ // IPv6 literal, it will add brackets around |host|.
std::string ToString() const;
+ // If |host| represents an IPv6 address, this string will not contain brackets
+ // around the address.
std::string host;
uint16 port;
};
« no previous file with comments | « no previous file | net/base/host_port_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698