| 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 9a96d3c78abc06d3286eaa98bbea194d426289be..0962143bfe136d2e4d7103a1263a9e03c9cde7f5 100644
|
| --- a/net/test/spawned_test_server/spawner_communicator.cc
|
| +++ b/net/test/spawned_test_server/spawner_communicator.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "net/test/spawned_test_server/spawner_communicator.h"
|
|
|
| +#include <limits>
|
| +
|
| #include "base/json/json_reader.h"
|
| #include "base/logging.h"
|
| #include "base/strings/stringprintf.h"
|
| @@ -24,7 +26,7 @@ namespace net {
|
|
|
| namespace {
|
|
|
| -GURL GenerateSpawnerCommandURL(const std::string& command, uint16 port) {
|
| +GURL GenerateSpawnerCommandURL(const std::string& command, uint16_t 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()));
|
| @@ -98,7 +100,7 @@ class SpawnerRequestData : public base::SupportsUserData::Data {
|
|
|
| } // namespace
|
|
|
| -SpawnerCommunicator::SpawnerCommunicator(uint16 port)
|
| +SpawnerCommunicator::SpawnerCommunicator(uint16_t port)
|
| : io_thread_("spawner_communicator"),
|
| event_(false, false),
|
| port_(port),
|
| @@ -324,7 +326,7 @@ void SpawnerCommunicator::OnReadCompleted(URLRequest* request, int num_bytes) {
|
| }
|
|
|
| bool SpawnerCommunicator::StartServer(const std::string& arguments,
|
| - uint16* port) {
|
| + uint16_t* port) {
|
| *port = 0;
|
| // Send the start command to spawner server to start the Python test server
|
| // on remote machine.
|
| @@ -352,11 +354,11 @@ bool SpawnerCommunicator::StartServer(const std::string& arguments,
|
| }
|
| int int_port;
|
| if (!server_data->GetInteger("port", &int_port) || int_port <= 0 ||
|
| - int_port > kuint16max) {
|
| + int_port > std::numeric_limits<uint16_t>::max()) {
|
| LOG(ERROR) << "Invalid port value: " << int_port;
|
| return false;
|
| }
|
| - *port = static_cast<uint16>(int_port);
|
| + *port = static_cast<uint16_t>(int_port);
|
| return true;
|
| }
|
|
|
|
|