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

Unified Diff: remoting/protocol/network_settings.h

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert bad change Created 6 years, 1 month 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 | « remoting/protocol/chromium_socket_factory.cc ('k') | remoting/protocol/network_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/network_settings.h
diff --git a/remoting/protocol/network_settings.h b/remoting/protocol/network_settings.h
index 7a9687e06f927f482aa53c037be6a32698888775..f64958aa519ff65dd22ab38dd6a8e234db15cc88 100644
--- a/remoting/protocol/network_settings.h
+++ b/remoting/protocol/network_settings.h
@@ -18,8 +18,8 @@ struct NetworkSettings {
// When hosts are configured with NAT traversal disabled they will
// typically also limit their P2P ports to this range, so that
// sessions may be blocked or un-blocked via firewall rules.
- static const int kDefaultMinPort = 12400;
- static const int kDefaultMaxPort = 12409;
+ static const uint16 kDefaultMinPort = 12400;
+ static const uint16 kDefaultMaxPort = 12409;
enum Flags {
// Don't use STUN or relay servers. Accept incoming P2P connection
@@ -59,15 +59,15 @@ struct NetworkSettings {
// Parse string in the form "<min_port>-<max_port>". E.g. "12400-12409".
// Returns true if string was parsed successfuly.
static bool ParsePortRange(const std::string& port_range,
- int* out_min_port,
- int* out_max_port);
+ uint16* out_min_port,
+ uint16* out_max_port);
uint32 flags;
// |min_port| and |max_port| specify range (inclusive) of ports used by
// P2P sessions. Any port can be used when both values are set to 0.
- int min_port;
- int max_port;
+ uint16 min_port;
+ uint16 max_port;
};
} // namespace protocol
« no previous file with comments | « remoting/protocol/chromium_socket_factory.cc ('k') | remoting/protocol/network_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698