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

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

Issue 716223002: Use uint16 for port numbers, chrome/ 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 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { 495 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) {
496 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { 496 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
497 std::string port_str = 497 std::string port_str =
498 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); 498 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort);
499 int port; 499 int port;
500 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) { 500 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) {
501 g_browser_process->CreateDevToolsHttpProtocolHandler( 501 g_browser_process->CreateDevToolsHttpProtocolHandler(
502 chrome::HOST_DESKTOP_TYPE_NATIVE, 502 chrome::HOST_DESKTOP_TYPE_NATIVE,
503 "127.0.0.1", 503 "127.0.0.1",
504 port); 504 static_cast<uint16>(port));
505 } else { 505 } else {
506 DLOG(WARNING) << "Invalid http debugger port number " << port; 506 DLOG(WARNING) << "Invalid http debugger port number " << port;
507 } 507 }
508 } 508 }
509 } 509 }
510 510
511 // Heap allocated class that listens for first page load, kicks off stat 511 // Heap allocated class that listens for first page load, kicks off stat
512 // recording and then deletes itself. 512 // recording and then deletes itself.
513 class LoadCompleteListener : public content::NotificationObserver { 513 class LoadCompleteListener : public content::NotificationObserver {
514 public: 514 public:
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 chromeos::CrosSettings::Shutdown(); 1716 chromeos::CrosSettings::Shutdown();
1717 #endif 1717 #endif
1718 #endif 1718 #endif
1719 } 1719 }
1720 1720
1721 // Public members: 1721 // Public members:
1722 1722
1723 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1723 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1724 chrome_extra_parts_.push_back(parts); 1724 chrome_extra_parts_.push_back(parts);
1725 } 1725 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698