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

Unified Diff: chrome/browser/devtools/remote_debugging_server.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (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
Index: chrome/browser/devtools/remote_debugging_server.cc
diff --git a/chrome/browser/devtools/remote_debugging_server.cc b/chrome/browser/devtools/remote_debugging_server.cc
index e7306d12936c1d8575eb2624de93d4789866373c..60289034f7611ad484c86168c62fbd6c4568b112 100644
--- a/chrome/browser/devtools/remote_debugging_server.cc
+++ b/chrome/browser/devtools/remote_debugging_server.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/devtools/remote_debugging_server.h"
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -29,18 +30,17 @@ namespace {
base::LazyInstance<bool>::Leaky g_tethering_enabled = LAZY_INSTANCE_INITIALIZER;
-const uint16 kMinTetheringPort = 9333;
-const uint16 kMaxTetheringPort = 9444;
+const uint16_t kMinTetheringPort = 9333;
+const uint16_t kMaxTetheringPort = 9444;
const int kBackLog = 10;
class TCPServerSocketFactory
: public devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory {
public:
- TCPServerSocketFactory(const std::string& address, uint16 port)
+ TCPServerSocketFactory(const std::string& address, uint16_t port)
: address_(address),
port_(port),
- last_tethering_port_(kMinTetheringPort) {
- }
+ last_tethering_port_(kMinTetheringPort) {}
private:
// devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory.
@@ -59,7 +59,7 @@ class TCPServerSocketFactory
if (last_tethering_port_ == kMaxTetheringPort)
last_tethering_port_ = kMinTetheringPort;
- uint16 port = ++last_tethering_port_;
+ uint16_t port = ++last_tethering_port_;
*name = base::UintToString(port);
scoped_ptr<net::TCPServerSocket> socket(
new net::TCPServerSocket(nullptr, net::NetLog::Source()));
@@ -71,8 +71,8 @@ class TCPServerSocketFactory
}
std::string address_;
- uint16 port_;
- uint16 last_tethering_port_;
+ uint16_t port_;
+ uint16_t last_tethering_port_;
DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
};
@@ -154,7 +154,7 @@ void RemoteDebuggingServer::EnableTetheringForDebug() {
RemoteDebuggingServer::RemoteDebuggingServer(
chrome::HostDesktopType host_desktop_type,
const std::string& ip,
- uint16 port) {
+ uint16_t port) {
base::FilePath output_dir;
if (!port) {
// The client requested an ephemeral port. Must write the selected
« no previous file with comments | « chrome/browser/devtools/remote_debugging_server.h ('k') | chrome/browser/diagnostics/diagnostics_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698