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

Unified Diff: mojo/services/network/network_context.cc

Issue 1543603002: Switch to standard integer types in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 | « mojo/services/network/network_context.h ('k') | mojo/services/network/network_service_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/network_context.cc
diff --git a/mojo/services/network/network_context.cc b/mojo/services/network/network_context.cc
index 39cd87ad59b5243fb06b6cdafb8593282b5b7bbb..6129ed4ccd967f6ed942850511abb7536a5dc401 100644
--- a/mojo/services/network/network_context.cc
+++ b/mojo/services/network/network_context.cc
@@ -4,6 +4,9 @@
#include "mojo/services/network/network_context.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <utility>
#include <vector>
@@ -12,6 +15,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "mojo/common/user_agent.h"
@@ -44,8 +48,8 @@ const char kLogNetLog[] = "log-net-log";
const char kTestingFixedHttpPort[] = "testing-fixed-http-port";
const char kTestingFixedHttpsPort[] = "testing-fixed-https-port";
-uint16 GetPortNumber(const base::CommandLine& command_line,
- const base::StringPiece& switch_name) {
+uint16_t GetPortNumber(const base::CommandLine& command_line,
+ const base::StringPiece& switch_name) {
std::string port_str = command_line.GetSwitchValueASCII(switch_name);
unsigned port;
if (!base::StringToUint(port_str, &port) || port > 65535) {
@@ -53,7 +57,7 @@ uint16 GetPortNumber(const base::CommandLine& command_line,
<< port_str << "' is not a valid port number.";
return 0;
}
- return static_cast<uint16>(port);
+ return static_cast<uint16_t>(port);
}
} // namespace
« no previous file with comments | « mojo/services/network/network_context.h ('k') | mojo/services/network/network_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698