diff options
| author | avi <avi@chromium.org> | 2015-12-01 11:27:07 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-12-01 19:35:33 +0000 |
| commit | 6516805e8c69ac65bcb7d52a2a208be97a7d2a50 (patch) | |
| tree | 0d67ff4a6fa2fe00b7dc5c51895b162599bab1f3 /cloud_print | |
| parent | e5bfeba55d3d80aa4f5c8385ede94853789b0a9a (diff) | |
| download | chromium_src-6516805e8c69ac65bcb7d52a2a208be97a7d2a50.zip chromium_src-6516805e8c69ac65bcb7d52a2a208be97a7d2a50.tar.gz chromium_src-6516805e8c69ac65bcb7d52a2a208be97a7d2a50.tar.bz2 | |
Remove kuint16max.
BUG=138542
Committed: https://crrev.com/0d94fda8c494d7a6c27d065d782f42e99d834f46
Cr-Commit-Position: refs/heads/master@{#362431}
Review URL: https://codereview.chromium.org/1475803002
Cr-Commit-Position: refs/heads/master@{#362472}
Diffstat (limited to 'cloud_print')
| -rw-r--r-- | cloud_print/gcp20/prototype/command_line_reader.cc | 14 | ||||
| -rw-r--r-- | cloud_print/gcp20/prototype/command_line_reader.h | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/cloud_print/gcp20/prototype/command_line_reader.cc b/cloud_print/gcp20/prototype/command_line_reader.cc index 8663efa..10988d2 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( diff --git a/cloud_print/gcp20/prototype/command_line_reader.h b/cloud_print/gcp20/prototype/command_line_reader.h index 20be585..018b79eb 100644 --- a/cloud_print/gcp20/prototype/command_line_reader.h +++ b/cloud_print/gcp20/prototype/command_line_reader.h @@ -5,15 +5,15 @@ #ifndef CLOUD_PRINT_GCP20_PROTOTYPE_COMMAND_LINE_READER_H_ #define CLOUD_PRINT_GCP20_PROTOTYPE_COMMAND_LINE_READER_H_ -#include <string> +#include <stdint.h> -#include "base/basictypes.h" +#include <string> namespace command_line_reader { -uint16 ReadHttpPort(uint16 default_value); +uint16_t ReadHttpPort(uint16_t default_value); -uint32 ReadTtl(uint32 default_value); +uint32_t ReadTtl(uint32_t default_value); std::string ReadServiceNamePrefix(const std::string& default_value); |
