summaryrefslogtreecommitdiffstats
path: root/remoting/host/simple_host_process.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:11:26 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:11:26 +0000
commit33b7c47777e2b88e6a876cc48a562f03d5dddae4 (patch)
tree8a54c9b4970ae970d0df0bf8cd6d420fb3d1c3a2 /remoting/host/simple_host_process.cc
parent8d5c43c4a9958b592565da16912fd44960aab906 (diff)
downloadchromium_src-33b7c47777e2b88e6a876cc48a562f03d5dddae4.zip
chromium_src-33b7c47777e2b88e6a876cc48a562f03d5dddae4.tar.gz
chromium_src-33b7c47777e2b88e6a876cc48a562f03d5dddae4.tar.bz2
Separate out HostConnection into an interface and a jingle-based
implementation. Refactor to inject the running thread for Jingle. Review URL: http://codereview.chromium.org/2753006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/simple_host_process.cc')
-rw-r--r--remoting/host/simple_host_process.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index 613cf52..d7f454c 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -22,6 +22,7 @@
#endif // defined (OS_POSIX)
#include "base/at_exit.h"
+#include "base/waitable_event.h"
#include "remoting/host/capturer_fake.h"
#include "remoting/host/encoder_verbatim.h"
#include "remoting/host/simple_host.h"
@@ -105,11 +106,14 @@ int main(int argc, char** argv) {
// Construct a simple host with username and auth_token.
// TODO(hclam): Allow the host to load saved credentials.
+ base::WaitableEvent host_done(false, false);
scoped_refptr<remoting::SimpleHost> host
= new remoting::SimpleHost(username, auth_token,
capturer.release(),
encoder.release(),
- executor.release());
+ executor.release(),
+ &host_done);
host->Run();
+ host_done.Wait();
return 0;
}