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

Unified Diff: net/base/host_port_pair.h

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 7 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
Index: net/base/host_port_pair.h
diff --git a/net/base/host_port_pair.h b/net/base/host_port_pair.h
index a4e5761bcccfe72d2cd3e5c2044352f961ff8939..9b1df5697b02186f34e3d1532814f73e33947ccb 100644
--- a/net/base/host_port_pair.h
+++ b/net/base/host_port_pair.h
@@ -19,7 +19,7 @@ class NET_EXPORT HostPortPair {
public:
HostPortPair();
// If |in_host| represents an IPv6 address, it should not bracket the address.
- HostPortPair(const std::string& in_host, uint16 in_port);
+ HostPortPair(const std::string& in_host, uint16_t in_port);
// Creates a HostPortPair for the origin of |url|.
static HostPortPair FromURL(const GURL& url);
@@ -52,17 +52,13 @@ class NET_EXPORT HostPortPair {
return host_;
}
- uint16 port() const {
- return port_;
- }
+ uint16_t port() const { return port_; }
void set_host(const std::string& in_host) {
host_ = in_host;
}
- void set_port(uint16 in_port) {
- port_ = in_port;
- }
+ void set_port(uint16_t in_port) { port_ = in_port; }
// ToString() will convert the HostPortPair to "host:port". If |host_| is an
// IPv6 literal, it will add brackets around |host_|.
@@ -75,7 +71,7 @@ class NET_EXPORT HostPortPair {
// If |host_| represents an IPv6 address, this string will not contain
// brackets around the address.
std::string host_;
- uint16 port_;
+ uint16_t port_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698