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

Unified Diff: content/shell/browser/shell_devtools_manager_delegate.cc

Issue 717373002: Use uint16 for port numbers, content/ edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 6 years, 1 month 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 | « content/public/common/socket_permission_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_devtools_manager_delegate.cc
diff --git a/content/shell/browser/shell_devtools_manager_delegate.cc b/content/shell/browser/shell_devtools_manager_delegate.cc
index 8ae3a2e9873a797644bc5aab60d9200c69683461..516420c87b5166f6ef2360d41cc5abb94483e860 100644
--- a/content/shell/browser/shell_devtools_manager_delegate.cc
+++ b/content/shell/browser/shell_devtools_manager_delegate.cc
@@ -66,7 +66,7 @@ class UnixDomainServerSocketFactory
class TCPServerSocketFactory
: public DevToolsHttpHandler::ServerSocketFactory {
public:
- TCPServerSocketFactory(const std::string& address, int port, int backlog)
+ TCPServerSocketFactory(const std::string& address, uint16 port, int backlog)
: DevToolsHttpHandler::ServerSocketFactory(
address, port, backlog) {}
@@ -95,14 +95,14 @@ CreateSocketFactory() {
#else
// See if the user specified a port on the command line (useful for
// automation). If not, use an ephemeral port by specifying 0.
- int port = 0;
+ uint16 port = 0;
if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) {
int temp_port;
std::string port_str =
command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
if (base::StringToInt(port_str, &temp_port) &&
temp_port > 0 && temp_port < 65535) {
- port = temp_port;
+ port = static_cast<uint16>(temp_port);
} else {
DLOG(WARNING) << "Invalid http debugger port number " << temp_port;
}
« no previous file with comments | « content/public/common/socket_permission_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698