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

Unified Diff: sync/tools/testserver/run_sync_testserver.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « sync/tools/sync_listen_notifications.cc ('k') | sync/util/cryptographer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/tools/testserver/run_sync_testserver.cc
diff --git a/sync/tools/testserver/run_sync_testserver.cc b/sync/tools/testserver/run_sync_testserver.cc
index 414076aa716dd3d2fa84df1662b7674b7f332f63..2057db2295c416b1917e7e097916450fc77de7bf 100644
--- a/sync/tools/testserver/run_sync_testserver.cc
+++ b/sync/tools/testserver/run_sync_testserver.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
#include <stdio.h>
#include "base/at_exit.h"
@@ -54,7 +55,7 @@ static bool RunSyncTest(
// Gets a port value from the switch with name |switch_name| and writes it to
// |port|. Returns true if a port was provided and false otherwise.
-static bool GetPortFromSwitch(const std::string& switch_name, uint16* port) {
+static bool GetPortFromSwitch(const std::string& switch_name, uint16_t* port) {
DCHECK(port != NULL) << "|port| is NULL";
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
int port_int = 0;
@@ -64,7 +65,7 @@ static bool GetPortFromSwitch(const std::string& switch_name, uint16* port) {
return false;
}
}
- *port = static_cast<uint16>(port_int);
+ *port = static_cast<uint16_t>(port_int);
return true;
}
@@ -99,10 +100,10 @@ int main(int argc, const char* argv[]) {
return RunSyncTest(FILE_PATH_LITERAL("xmppserver_test.py")) ? 0 : -1;
}
- uint16 port = 0;
+ uint16_t port = 0;
GetPortFromSwitch("port", &port);
- uint16 xmpp_port = 0;
+ uint16_t xmpp_port = 0;
GetPortFromSwitch("xmpp-port", &xmpp_port);
scoped_ptr<syncer::LocalSyncTestServer> test_server(
« no previous file with comments | « sync/tools/sync_listen_notifications.cc ('k') | sync/util/cryptographer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698