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

Unified Diff: cloud_print/gcp20/prototype/command_line_reader.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: cloud_print/gcp20/prototype/command_line_reader.cc
diff --git a/cloud_print/gcp20/prototype/command_line_reader.cc b/cloud_print/gcp20/prototype/command_line_reader.cc
index 8663efa40de12592eaf762ee9c11a12ce207ab43..10988d2440563e6450fbc92bfa86473969c4da4d 100644
--- a/cloud_print/gcp20/prototype/command_line_reader.cc
+++ b/cloud_print/gcp20/prototype/command_line_reader.cc
@@ -4,6 +4,8 @@
#include "cloud_print/gcp20/prototype/command_line_reader.h"
+#include <limits>
+
#include "base/command_line.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
@@ -11,8 +13,8 @@
namespace command_line_reader {
-uint16 ReadHttpPort(uint16 default_value) {
- uint32 http_port = 0;
+uint16_t ReadHttpPort(uint16_t default_value) {
+ uint32_t http_port = 0;
std::string http_port_string =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
@@ -21,17 +23,17 @@ uint16 ReadHttpPort(uint16 default_value) {
if (!base::StringToUint(http_port_string, &http_port))
http_port = default_value;
- if (http_port > kuint16max) {
+ if (http_port > std::numeric_limits<uint16_t>::max()) {
LOG(ERROR) << "HTTP Port is too large";
http_port = default_value;
}
VLOG(1) << "HTTP port for responses: " << http_port;
- return static_cast<uint16>(http_port);
+ return static_cast<uint16_t>(http_port);
}
-uint32 ReadTtl(uint32 default_value) {
- uint32 ttl = 0;
+uint32_t ReadTtl(uint32_t default_value) {
+ uint32_t ttl = 0;
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!base::StringToUint(
« no previous file with comments | « cloud_print/gcp20/prototype/command_line_reader.h ('k') | components/policy/core/browser/url_blacklist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698