diff options
author | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 20:50:37 +0000 |
---|---|---|
committer | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 20:50:37 +0000 |
commit | 76698ea6fae3852ac5a5591cf3e0f56eade677d0 (patch) | |
tree | 487506bb3628a7af6719e902441cdfeefed99584 /chrome | |
parent | f6ef00570d6ad3227e4671838a64a0426bc176b5 (diff) | |
download | chromium_src-76698ea6fae3852ac5a5591cf3e0f56eade677d0.zip chromium_src-76698ea6fae3852ac5a5591cf3e0f56eade677d0.tar.gz chromium_src-76698ea6fae3852ac5a5591cf3e0f56eade677d0.tar.bz2 |
Browser process does not try to create RemoteDebuggingServer again if it is already created anymore.
BUG=143890
Review URL: https://chromiumcodereview.appspot.com/10827438
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_process.h | 2 | ||||
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 10 | ||||
-rw-r--r-- | chrome/browser/browser_process_impl.h | 2 | ||||
-rw-r--r-- | chrome/browser/ui/startup/startup_browser_creator_impl.cc | 2 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.cc | 2 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.h | 2 |
6 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h index fee9cbd..b31ae0a 100644 --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h @@ -136,7 +136,7 @@ class BrowserProcess { virtual AutomationProviderList* GetAutomationProviderList() = 0; - virtual void InitDevToolsHttpProtocolHandler( + virtual void CreateDevToolsHttpProtocolHandler( Profile* profile, const std::string& ip, int port, diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 42b81c3..7718a0b 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -471,14 +471,18 @@ AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() { #endif } -void BrowserProcessImpl::InitDevToolsHttpProtocolHandler( +void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler( Profile* profile, const std::string& ip, int port, const std::string& frontend_url) { DCHECK(CalledOnValidThread()); - remote_debugging_server_.reset( - new RemoteDebuggingServer(profile, ip, port, frontend_url)); + // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser + // is started with several profiles or existing browser process is reused. + if (!remote_debugging_server_.get()) { + remote_debugging_server_.reset( + new RemoteDebuggingServer(profile, ip, port, frontend_url)); + } } bool BrowserProcessImpl::IsShuttingDown() { diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 35a0414..34ee7db 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -78,7 +78,7 @@ class BrowserProcessImpl : public BrowserProcess, virtual IconManager* icon_manager() OVERRIDE; virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE; virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE; - virtual void InitDevToolsHttpProtocolHandler( + virtual void CreateDevToolsHttpProtocolHandler( Profile* profile, const std::string& ip, int port, diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index ae410bb..61f6d69 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc @@ -317,7 +317,7 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile, frontend_str = command_line_.GetSwitchValueASCII( switches::kRemoteDebuggingFrontend); } - g_browser_process->InitDevToolsHttpProtocolHandler( + g_browser_process->CreateDevToolsHttpProtocolHandler( profile, "127.0.0.1", static_cast<int>(port), diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index 4363608..d8d7a80 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc @@ -158,7 +158,7 @@ AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { return NULL; } -void TestingBrowserProcess::InitDevToolsHttpProtocolHandler( +void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler( Profile* profile, const std::string& ip, int port, diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 5bedba9..e5c573b 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -76,7 +76,7 @@ class TestingBrowserProcess : public BrowserProcess { virtual NotificationUIManager* notification_ui_manager() OVERRIDE; virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE; virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE; - virtual void InitDevToolsHttpProtocolHandler( + virtual void CreateDevToolsHttpProtocolHandler( Profile* profile, const std::string& ip, int port, |