summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 02:46:54 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 02:46:54 +0000
commit71eb23d453937c320f1c7a3f46c1aae335df6269 (patch)
tree6c13ed9a14c68b4bfda90c26fce9b03b1327c79d /remoting
parent53d23fcc886d2a412cd8aaeb45c3c60f0586093c (diff)
downloadchromium_src-71eb23d453937c320f1c7a3f46c1aae335df6269.zip
chromium_src-71eb23d453937c320f1c7a3f46c1aae335df6269.tar.gz
chromium_src-71eb23d453937c320f1c7a3f46c1aae335df6269.tar.bz2
Revert 55507 - Start chromoting host in the service process though a method call
This change exposes method calls to configure the chromoting host and allow it to be started from a method. This will allow us to use IPC message to start the chromoting host. TEST=unit_tests --gtest_filter=ServiceProcess* BUG=50243, 50244 Review URL: http://codereview.chromium.org/3084024 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/3110004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/heartbeat_sender.cc6
-rw-r--r--remoting/jingle_glue/jingle_client.cc15
-rw-r--r--remoting/remoting.gyp4
3 files changed, 8 insertions, 17 deletions
diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc
index e6a78f7..b62b268a 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -65,7 +65,7 @@ void HeartbeatSender::Start() {
return;
}
- DCHECK_EQ(INITIALIZED, state_);
+ DCHECK(state_ == INITIALIZED);
state_ = STARTED;
request_.reset(jingle_client_->CreateIqRequest());
@@ -82,9 +82,7 @@ void HeartbeatSender::Stop() {
return;
}
- // We may call Stop() even if we have not started.
- if (state_ != STARTED)
- return;
+ DCHECK(state_ == STARTED);
state_ = STOPPED;
request_.reset(NULL);
}
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc
index b3ea334..eb89e21 100644
--- a/remoting/jingle_glue/jingle_client.cc
+++ b/remoting/jingle_glue/jingle_client.cc
@@ -76,11 +76,6 @@ void JingleClient::DoConnect(scoped_refptr<JingleChannel> channel,
}
void JingleClient::Close() {
- // Once we are closed we really shouldn't talk to the callback again. In the
- // case when JingleClient outlives the owner access the callback is not safe.
- // TODO(hclam): We need to lock to reset callback.
- callback_ = NULL;
-
message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, &JingleClient::DoClose));
}
@@ -90,14 +85,12 @@ void JingleClient::DoClose() {
// If we have not yet initialized and the client is already closed then
// don't close again.
- if (state_ == CLOSED)
+ if (!callback_ || state_ == CLOSED)
return;
- if (client_) {
- client_->Disconnect();
- // Client is deleted by TaskRunner.
- client_ = NULL;
- }
+ client_->Disconnect();
+ // Client is deleted by TaskRunner.
+ client_ = NULL;
tunnel_session_client_.reset();
port_allocator_.reset();
session_manager_.reset();
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index b1c6e1a..51afbbf 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -172,8 +172,6 @@
'sources': [
'host/capturer.cc',
'host/capturer.h',
- 'host/capturer_fake.cc',
- 'host/capturer_fake.h',
'host/chromoting_host.cc',
'host/chromoting_host.h',
'host/chromoting_host_context.cc',
@@ -263,6 +261,8 @@
'../base/base.gyp:base_i18n',
],
'sources': [
+ 'host/capturer_fake.cc',
+ 'host/capturer_fake.h',
'host/capturer_fake_ascii.cc',
'host/capturer_fake_ascii.h',
'host/simple_host_process.cc',