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

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

Issue 15305014: Remove reference to profile in devtools remote debugging initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
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 #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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 base::FilePath user_data_dir = 464 base::FilePath user_data_dir =
465 g_browser_process->profile_manager()->user_data_dir(); 465 g_browser_process->profile_manager()->user_data_dir();
466 base::FilePath startup_profile_dir = 466 base::FilePath startup_profile_dir =
467 GetStartupProfilePath(user_data_dir, command_line); 467 GetStartupProfilePath(user_data_dir, command_line);
468 468
469 StartupBrowserCreator::ProcessCommandLineAlreadyRunning( 469 StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
470 command_line, current_directory, startup_profile_dir); 470 command_line, current_directory, startup_profile_dir);
471 return true; 471 return true;
472 } 472 }
473 473
474 void LaunchDevToolsHandlerIfNeeded(Profile* profile, 474 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) {
475 const CommandLine& command_line) {
476 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { 475 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
477 std::string port_str = 476 std::string port_str =
478 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); 477 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort);
479 int port; 478 int port;
480 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { 479 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
481 std::string frontend_str; 480 std::string frontend_str;
482 if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) { 481 if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) {
483 frontend_str = command_line.GetSwitchValueASCII( 482 frontend_str = command_line.GetSwitchValueASCII(
484 ::switches::kRemoteDebuggingFrontend); 483 ::switches::kRemoteDebuggingFrontend);
485 } 484 }
486 g_browser_process->CreateDevToolsHttpProtocolHandler( 485 g_browser_process->CreateDevToolsHttpProtocolHandler(
487 profile,
488 chrome::HOST_DESKTOP_TYPE_NATIVE, 486 chrome::HOST_DESKTOP_TYPE_NATIVE,
489 "127.0.0.1", 487 "127.0.0.1",
490 port, 488 port,
491 frontend_str); 489 frontend_str);
492 } else { 490 } else {
493 DLOG(WARNING) << "Invalid http debugger port number " << port; 491 DLOG(WARNING) << "Invalid http debugger port number " << port;
494 } 492 }
495 } 493 }
496 } 494 }
497 495
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 // PostBrowserStart() 1028 // PostBrowserStart()
1031 1029
1032 void ChromeBrowserMainParts::PreProfileInit() { 1030 void ChromeBrowserMainParts::PreProfileInit() {
1033 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreProfileInit"); 1031 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreProfileInit");
1034 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1032 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1035 chrome_extra_parts_[i]->PreProfileInit(); 1033 chrome_extra_parts_[i]->PreProfileInit();
1036 } 1034 }
1037 1035
1038 void ChromeBrowserMainParts::PostProfileInit() { 1036 void ChromeBrowserMainParts::PostProfileInit() {
1039 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); 1037 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit");
1040 LaunchDevToolsHandlerIfNeeded(profile(), parsed_command_line()); 1038 LaunchDevToolsHandlerIfNeeded(parsed_command_line());
1041 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1039 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1042 chrome_extra_parts_[i]->PostProfileInit(); 1040 chrome_extra_parts_[i]->PostProfileInit();
1043 } 1041 }
1044 1042
1045 void ChromeBrowserMainParts::PreBrowserStart() { 1043 void ChromeBrowserMainParts::PreBrowserStart() {
1046 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreBrowserStart"); 1044 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreBrowserStart");
1047 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1045 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1048 chrome_extra_parts_[i]->PreBrowserStart(); 1046 chrome_extra_parts_[i]->PreBrowserStart();
1049 1047
1050 three_d_observer_.reset(new ThreeDAPIObserver()); 1048 three_d_observer_.reset(new ThreeDAPIObserver());
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 if (base::win::GetVersion() <= base::win::VERSION_XP) 1788 if (base::win::GetVersion() <= base::win::VERSION_XP)
1791 uma_name += "_XP"; 1789 uma_name += "_XP";
1792 1790
1793 uma_name += "_PreRead_"; 1791 uma_name += "_PreRead_";
1794 uma_name += pre_read_percentage; 1792 uma_name += pre_read_percentage;
1795 AddPreReadHistogramTime(uma_name.c_str(), time); 1793 AddPreReadHistogramTime(uma_name.c_str(), time);
1796 } 1794 }
1797 #endif 1795 #endif
1798 #endif 1796 #endif
1799 } 1797 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/devtools/browser_list_tabcontents_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698