OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |