summaryrefslogtreecommitdiffstats
path: root/chrome/browser/service
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 22:15:09 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-18 22:15:09 +0000
commitb9eb8b20e029cf288b36da336e4c5611c9a65a55 (patch)
tree4134579298bc01ebbedc060f511caa40902a8d84 /chrome/browser/service
parentc3265d8866e5b0d2c1b129e4da685755a35a84b2 (diff)
downloadchromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.zip
chromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.tar.gz
chromium_src-b9eb8b20e029cf288b36da336e4c5611c9a65a55.tar.bz2
Revert 56600 - ServiceProcessControlBrowserTest.LaunchAndIPC crashes.
Start/stop service process when browser starts and stop Save the information that the setup of remoting has completed. After setup has been completed we start and stop service process when --enable-remoting presents when browser starts. Also save the information in the service process that host is registered and ready to be used. Again start chromoting host automatically once the host registration is done. Review URL: http://codereview.chromium.org/3185015 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/3107024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/service')
-rw-r--r--chrome/browser/service/service_process_control.cc13
-rw-r--r--chrome/browser/service/service_process_control_manager.cc6
2 files changed, 3 insertions, 16 deletions
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index 5979084..9b76dc7 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -109,7 +109,6 @@ void ServiceProcessControl::ConnectInternal() {
base::Thread* io_thread = g_browser_process->io_thread();
// TODO(hclam): Determine the the channel id from profile and type.
- // TODO(hclam): Handle error connecting to channel.
const std::string channel_id = GetServiceProcessChannelName(type_);
channel_.reset(
new IPC::SyncChannel(channel_id, IPC::Channel::MODE_CLIENT, this, NULL,
@@ -121,10 +120,8 @@ void ServiceProcessControl::ConnectInternal() {
void ServiceProcessControl::Launch(Task* task) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
if (channel_.get()) {
- if (task) {
- task->Run();
- delete task;
- }
+ task->Run();
+ delete task;
return;
}
@@ -165,7 +162,7 @@ void ServiceProcessControl::OnProcessLaunched(Task* task) {
// After we have successfully created the service process we try to connect
// to it. The launch task is transfered to a connect task.
ConnectInternal();
- } else if (task) {
+ } else {
// If we don't have process handle that means launching the service process
// has failed.
task->Run();
@@ -186,8 +183,6 @@ void ServiceProcessControl::OnMessageReceived(const IPC::Message& message) {
void ServiceProcessControl::OnChannelConnected(int32 peer_pid) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- if (!connect_done_task_.get())
- return;
connect_done_task_->Run();
connect_done_task_.reset();
}
@@ -195,8 +190,6 @@ void ServiceProcessControl::OnChannelConnected(int32 peer_pid) {
void ServiceProcessControl::OnChannelError() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
channel_.reset();
- if (!connect_done_task_.get())
- return;
connect_done_task_->Run();
connect_done_task_.reset();
}
diff --git a/chrome/browser/service/service_process_control_manager.cc b/chrome/browser/service/service_process_control_manager.cc
index 6c946b4..821de9a 100644
--- a/chrome/browser/service/service_process_control_manager.cc
+++ b/chrome/browser/service/service_process_control_manager.cc
@@ -36,12 +36,6 @@ ServiceProcessControl* ServiceProcessControlManager::GetProcessControl(
}
void ServiceProcessControlManager::Shutdown() {
- // TODO(hclam): Normally we should just delete the list but for simplicity
- // we also shutdown the service processes.
- for (ServiceProcessControlList::iterator i = process_control_list_.begin();
- i != process_control_list_.end(); ++i) {
- (*i)->Shutdown();
- }
STLDeleteElements(&process_control_list_);
}