summaryrefslogtreecommitdiffstats
path: root/remoting/host/simple_host_process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/simple_host_process.cc')
-rw-r--r--remoting/host/simple_host_process.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index d32547f..86890f7 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -25,6 +25,7 @@
#include "base/waitable_event.h"
#include "remoting/host/capturer_fake.h"
#include "remoting/host/encoder_verbatim.h"
+#include "remoting/host/host_config.h"
#include "remoting/host/chromoting_host.h"
#if defined(OS_WIN)
@@ -102,15 +103,21 @@ int main(int argc, char** argv) {
capturer.reset(new remoting::CapturerFake());
}
+ // TODO(sergeyu): Implement HostConfigStorage and use it here to load
+ // settings.
+ scoped_refptr<remoting::HostConfig> config(new remoting::HostConfig());
+ config->set_xmpp_login(username);
+ config->set_xmpp_auth_token(auth_token);
+ config->set_host_id("foo");
+
// Construct a chromoting host with username and auth_token.
- // TODO(hclam): Allow the host to load saved credentials.
base::WaitableEvent host_done(false, false);
- scoped_refptr<remoting::ChromotingHost> host
- = new remoting::ChromotingHost(username, auth_token,
- capturer.release(),
- encoder.release(),
- executor.release(),
- &host_done);
+ scoped_refptr<remoting::ChromotingHost> host =
+ new remoting::ChromotingHost(config,
+ capturer.release(),
+ encoder.release(),
+ executor.release(),
+ &host_done);
host->Run();
host_done.Wait();
return 0;