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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert bad change 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { 496 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) {
497 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { 497 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
498 std::string port_str = 498 std::string port_str =
499 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); 499 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort);
500 int port; 500 int port;
501 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) { 501 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) {
502 g_browser_process->CreateDevToolsHttpProtocolHandler( 502 g_browser_process->CreateDevToolsHttpProtocolHandler(
503 chrome::HOST_DESKTOP_TYPE_NATIVE, 503 chrome::HOST_DESKTOP_TYPE_NATIVE,
504 "127.0.0.1", 504 "127.0.0.1",
505 port); 505 static_cast<uint16>(port));
506 } else { 506 } else {
507 DLOG(WARNING) << "Invalid http debugger port number " << port; 507 DLOG(WARNING) << "Invalid http debugger port number " << port;
508 } 508 }
509 } 509 }
510 } 510 }
511 511
512 // Heap allocated class that listens for first page load, kicks off stat 512 // Heap allocated class that listens for first page load, kicks off stat
513 // recording and then deletes itself. 513 // recording and then deletes itself.
514 class LoadCompleteListener : public content::NotificationObserver { 514 class LoadCompleteListener : public content::NotificationObserver {
515 public: 515 public:
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 chromeos::CrosSettings::Shutdown(); 1722 chromeos::CrosSettings::Shutdown();
1723 #endif 1723 #endif
1724 #endif 1724 #endif
1725 } 1725 }
1726 1726
1727 // Public members: 1727 // Public members:
1728 1728
1729 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1729 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1730 chrome_extra_parts_.push_back(parts); 1730 chrome_extra_parts_.push_back(parts);
1731 } 1731 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/devtools/browser_list_tabcontents_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698