| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 } | 536 } |
| 537 #endif // !defined(OS_ANDROID) | 537 #endif // !defined(OS_ANDROID) |
| 538 | 538 |
| 539 void LaunchDevToolsHandlerIfNeeded(const base::CommandLine& command_line) { | 539 void LaunchDevToolsHandlerIfNeeded(const base::CommandLine& command_line) { |
| 540 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { | 540 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { |
| 541 std::string port_str = | 541 std::string port_str = |
| 542 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); | 542 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); |
| 543 int port; | 543 int port; |
| 544 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) { | 544 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) { |
| 545 g_browser_process->CreateDevToolsHttpProtocolHandler( | 545 g_browser_process->CreateDevToolsHttpProtocolHandler( |
| 546 chrome::HOST_DESKTOP_TYPE_NATIVE, "127.0.0.1", | 546 "127.0.0.1", static_cast<uint16_t>(port)); |
| 547 static_cast<uint16_t>(port)); | |
| 548 } else { | 547 } else { |
| 549 DLOG(WARNING) << "Invalid http debugger port number " << port; | 548 DLOG(WARNING) << "Invalid http debugger port number " << port; |
| 550 } | 549 } |
| 551 } | 550 } |
| 552 } | 551 } |
| 553 | 552 |
| 554 class ScopedMainMessageLoopRunEvent { | 553 class ScopedMainMessageLoopRunEvent { |
| 555 public: | 554 public: |
| 556 ScopedMainMessageLoopRunEvent() { | 555 ScopedMainMessageLoopRunEvent() { |
| 557 TRACE_EVENT_ASYNC_BEGIN0( | 556 TRACE_EVENT_ASYNC_BEGIN0( |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1892 chromeos::CrosSettings::Shutdown(); | 1891 chromeos::CrosSettings::Shutdown(); |
| 1893 #endif // defined(OS_CHROMEOS) | 1892 #endif // defined(OS_CHROMEOS) |
| 1894 #endif // defined(OS_ANDROID) | 1893 #endif // defined(OS_ANDROID) |
| 1895 } | 1894 } |
| 1896 | 1895 |
| 1897 // Public members: | 1896 // Public members: |
| 1898 | 1897 |
| 1899 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1898 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1900 chrome_extra_parts_.push_back(parts); | 1899 chrome_extra_parts_.push_back(parts); |
| 1901 } | 1900 } |
| OLD | NEW |