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

Unified Diff: net/base/net_util.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « net/base/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 9dcf9dfccac8c82d4856c357ffc9b9c374c330f5..3b49dffb5c20d889003a09755276ddaa8e41542d 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -306,7 +306,7 @@ bool IsPortAllowedByDefault(int port) {
return false;
}
}
- return true;
+ return IsPortValid(port);
}
bool IsPortAllowedByFtp(int port) {
@@ -573,7 +573,7 @@ bool GetIPAddressFromSockAddr(const struct sockaddr* sock_addr,
*address = reinterpret_cast<const uint8*>(&addr->btAddr);
*address_len = kBluetoothAddressSize;
if (port)
- *port = addr->port;
+ *port = static_cast<uint16>(addr->port);
return true;
}
#endif
@@ -1015,8 +1015,7 @@ bool IsLocalhost(const std::string& host) {
}
NetworkInterface::NetworkInterface()
- : type(NetworkChangeNotifier::CONNECTION_UNKNOWN),
- network_prefix(0) {
+ : type(NetworkChangeNotifier::CONNECTION_UNKNOWN), prefix_length(0) {
}
NetworkInterface::NetworkInterface(const std::string& name,
@@ -1024,14 +1023,14 @@ NetworkInterface::NetworkInterface(const std::string& name,
uint32 interface_index,
NetworkChangeNotifier::ConnectionType type,
const IPAddressNumber& address,
- uint32 network_prefix,
+ uint32 prefix_length,
int ip_address_attributes)
: name(name),
friendly_name(friendly_name),
interface_index(interface_index),
type(type),
address(address),
- network_prefix(network_prefix),
+ prefix_length(prefix_length),
ip_address_attributes(ip_address_attributes) {
}
« no previous file with comments | « net/base/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698