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

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

Issue 288493007: DevTools: allow binding remote debugging to port 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 command_line, current_directory, startup_profile_dir); 450 command_line, current_directory, startup_profile_dir);
451 return true; 451 return true;
452 } 452 }
453 #endif // !defined(OS_ANDROID) 453 #endif // !defined(OS_ANDROID)
454 454
455 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { 455 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) {
456 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { 456 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
457 std::string port_str = 457 std::string port_str =
458 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); 458 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort);
459 int port; 459 int port;
460 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { 460 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) {
461 g_browser_process->CreateDevToolsHttpProtocolHandler( 461 g_browser_process->CreateDevToolsHttpProtocolHandler(
462 chrome::HOST_DESKTOP_TYPE_NATIVE, 462 chrome::HOST_DESKTOP_TYPE_NATIVE,
463 "127.0.0.1", 463 "127.0.0.1",
464 port); 464 port);
465 } else { 465 } else {
466 DLOG(WARNING) << "Invalid http debugger port number " << port; 466 DLOG(WARNING) << "Invalid http debugger port number " << port;
467 } 467 }
468 } 468 }
469 } 469 }
470 470
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 chromeos::CrosSettings::Shutdown(); 1652 chromeos::CrosSettings::Shutdown();
1653 #endif 1653 #endif
1654 #endif 1654 #endif
1655 } 1655 }
1656 1656
1657 // Public members: 1657 // Public members:
1658 1658
1659 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1659 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1660 chrome_extra_parts_.push_back(parts); 1660 chrome_extra_parts_.push_back(parts);
1661 } 1661 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698