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

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

Issue 1485853003: Revert of Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: 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/test/spawned_test_server/spawner_communicator.h ('k') | net/tools/dns_fuzz_stub/dns_fuzz_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/spawner_communicator.cc
diff --git a/net/test/spawned_test_server/spawner_communicator.cc b/net/test/spawned_test_server/spawner_communicator.cc
index 0962143bfe136d2e4d7103a1263a9e03c9cde7f5..9a96d3c78abc06d3286eaa98bbea194d426289be 100644
--- a/net/test/spawned_test_server/spawner_communicator.cc
+++ b/net/test/spawned_test_server/spawner_communicator.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "net/test/spawned_test_server/spawner_communicator.h"
-
-#include <limits>
#include "base/json/json_reader.h"
#include "base/logging.h"
@@ -26,7 +24,7 @@
namespace {
-GURL GenerateSpawnerCommandURL(const std::string& command, uint16_t port) {
+GURL GenerateSpawnerCommandURL(const std::string& command, uint16 port) {
// Always performs HTTP request for sending command to the spawner server.
return GURL(base::StringPrintf("%s:%u/%s", "http://127.0.0.1", port,
command.c_str()));
@@ -100,7 +98,7 @@
} // namespace
-SpawnerCommunicator::SpawnerCommunicator(uint16_t port)
+SpawnerCommunicator::SpawnerCommunicator(uint16 port)
: io_thread_("spawner_communicator"),
event_(false, false),
port_(port),
@@ -326,7 +324,7 @@
}
bool SpawnerCommunicator::StartServer(const std::string& arguments,
- uint16_t* port) {
+ uint16* port) {
*port = 0;
// Send the start command to spawner server to start the Python test server
// on remote machine.
@@ -354,11 +352,11 @@
}
int int_port;
if (!server_data->GetInteger("port", &int_port) || int_port <= 0 ||
- int_port > std::numeric_limits<uint16_t>::max()) {
+ int_port > kuint16max) {
LOG(ERROR) << "Invalid port value: " << int_port;
return false;
}
- *port = static_cast<uint16_t>(int_port);
+ *port = static_cast<uint16>(int_port);
return true;
}
« no previous file with comments | « net/test/spawned_test_server/spawner_communicator.h ('k') | net/tools/dns_fuzz_stub/dns_fuzz_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698