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

Unified Diff: net/test/spawned_test_server/remote_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
Index: net/test/spawned_test_server/remote_test_server.cc
diff --git a/net/test/spawned_test_server/remote_test_server.cc b/net/test/spawned_test_server/remote_test_server.cc
index 0e1303e066c235b387fbeac524cb9afd8cdc8ff1..c563242bb3c66e9991178279c073eb5eb43e81da 100644
--- a/net/test/spawned_test_server/remote_test_server.cc
+++ b/net/test/spawned_test_server/remote_test_server.cc
@@ -4,6 +4,9 @@
#include "net/test/spawned_test_server/remote_test_server.h"
+#include <stdint.h>
+
+#include <limits>
#include <vector>
#include "base/base_paths.h"
@@ -108,7 +111,7 @@ bool RemoteTestServer::Start() {
return false;
// Start the Python test server on the remote machine.
- uint16 test_server_port;
+ uint16_t test_server_port;
if (!spawner_communicator_->StartServer(arguments_string,
&test_server_port)) {
return false;
@@ -184,13 +187,15 @@ bool RemoteTestServer::Init(const base::FilePath& document_root) {
// Verify the ports information.
base::StringToInt(ports[0], &spawner_server_port_);
if (!spawner_server_port_ ||
- static_cast<uint32>(spawner_server_port_) >= kuint16max)
+ static_cast<uint32_t>(spawner_server_port_) >=
+ std::numeric_limits<uint16_t>::max())
return false;
// Allow the test_server_port to be 0, which means the test server spawner
// will pick up a random port to run the test server.
base::StringToInt(ports[1], &test_server_port);
- if (static_cast<uint32>(test_server_port) >= kuint16max)
+ if (static_cast<uint32_t>(test_server_port) >=
+ std::numeric_limits<uint16_t>::max())
return false;
SetPort(test_server_port);
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | net/test/spawned_test_server/spawner_communicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698