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

Unified Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1475803002: Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: cloud print Created 5 years 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/dns/dns_transaction_unittest.cc ('k') | net/test/spawned_test_server/remote_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/base_test_server.cc
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index d245cc2e21879e8801408a7c352f66ed57d1d4c1..f45ef4a6fc140b4915f412702d8ae7ec5900ed91 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -4,6 +4,9 @@
#include "net/test/spawned_test_server/base_test_server.h"
+#include <stdint.h>
+
+#include <limits>
#include <string>
#include <vector>
@@ -285,11 +288,11 @@ bool BaseTestServer::GetAddressList(AddressList* address_list) const {
return true;
}
-uint16 BaseTestServer::GetPort() {
+uint16_t BaseTestServer::GetPort() {
return host_port_pair_.port();
}
-void BaseTestServer::SetPort(uint16 port) {
+void BaseTestServer::SetPort(uint16_t port) {
host_port_pair_.set_port(port);
}
@@ -414,7 +417,7 @@ bool BaseTestServer::ParseServerData(const std::string& server_data) {
LOG(ERROR) << "Could not find port value";
return false;
}
- if ((port <= 0) || (port > kuint16max)) {
+ if ((port <= 0) || (port > std::numeric_limits<uint16_t>::max())) {
LOG(ERROR) << "Invalid port value: " << port;
return false;
}
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/test/spawned_test_server/remote_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698