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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 base::FilePath user_data_dir = | 463 base::FilePath user_data_dir = |
464 g_browser_process->profile_manager()->user_data_dir(); | 464 g_browser_process->profile_manager()->user_data_dir(); |
465 base::FilePath startup_profile_dir = | 465 base::FilePath startup_profile_dir = |
466 GetStartupProfilePath(user_data_dir, command_line); | 466 GetStartupProfilePath(user_data_dir, command_line); |
467 | 467 |
468 StartupBrowserCreator::ProcessCommandLineAlreadyRunning( | 468 StartupBrowserCreator::ProcessCommandLineAlreadyRunning( |
469 command_line, current_directory, startup_profile_dir); | 469 command_line, current_directory, startup_profile_dir); |
470 return true; | 470 return true; |
471 } | 471 } |
472 | 472 |
473 void LaunchDevToolsHandlerIfNeeded(Profile* profile, | 473 void LaunchDevToolsHandlerIfNeeded(Profile* profile, |
pfeldman
2013/05/23 01:12:14
Profile parameter is no longer used.
Tim Song
2013/05/23 17:05:55
Done.
| |
474 const CommandLine& command_line) { | 474 const CommandLine& command_line) { |
475 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { | 475 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { |
476 std::string port_str = | 476 std::string port_str = |
477 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); | 477 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); |
478 int port; | 478 int port; |
479 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { | 479 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { |
480 std::string frontend_str; | 480 std::string frontend_str; |
481 if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) { | 481 if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) { |
482 frontend_str = command_line.GetSwitchValueASCII( | 482 frontend_str = command_line.GetSwitchValueASCII( |
483 ::switches::kRemoteDebuggingFrontend); | 483 ::switches::kRemoteDebuggingFrontend); |
484 } | 484 } |
485 g_browser_process->CreateDevToolsHttpProtocolHandler( | 485 g_browser_process->CreateDevToolsHttpProtocolHandler( |
486 profile, | |
487 chrome::HOST_DESKTOP_TYPE_NATIVE, | 486 chrome::HOST_DESKTOP_TYPE_NATIVE, |
488 "127.0.0.1", | 487 "127.0.0.1", |
489 port, | 488 port, |
490 frontend_str); | 489 frontend_str); |
491 } else { | 490 } else { |
492 DLOG(WARNING) << "Invalid http debugger port number " << port; | 491 DLOG(WARNING) << "Invalid http debugger port number " << port; |
493 } | 492 } |
494 } | 493 } |
495 } | 494 } |
496 | 495 |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1808 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1807 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1809 uma_name += "_XP"; | 1808 uma_name += "_XP"; |
1810 | 1809 |
1811 uma_name += "_PreRead_"; | 1810 uma_name += "_PreRead_"; |
1812 uma_name += pre_read_percentage; | 1811 uma_name += pre_read_percentage; |
1813 AddPreReadHistogramTime(uma_name.c_str(), time); | 1812 AddPreReadHistogramTime(uma_name.c_str(), time); |
1814 } | 1813 } |
1815 #endif | 1814 #endif |
1816 #endif | 1815 #endif |
1817 } | 1816 } |
OLD | NEW |