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

Unified Diff: net/base/host_mapping_rules.cc

Issue 718273002: Use uint16 for port numbers, net/ edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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
Index: net/base/host_mapping_rules.cc
diff --git a/net/base/host_mapping_rules.cc b/net/base/host_mapping_rules.cc
index f91f3fd0b4e7e2547123d50b72fe6ecbe5ce079a..01b98b7b2445e200288759cdafdc252579aded97 100644
--- a/net/base/host_mapping_rules.cc
+++ b/net/base/host_mapping_rules.cc
@@ -58,7 +58,7 @@ bool HostMappingRules::RewriteHost(HostPortPair* host_port) const {
host_port->set_host(rule.replacement_hostname);
if (rule.replacement_port != -1)
- host_port->set_port(rule.replacement_port);
+ host_port->set_port(static_cast<uint16>(rule.replacement_port));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698