From 34f09f1a76bcb5391a602928269272a4ba9aa1c0 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Tue, 15 Jun 2010 23:00:26 +0000 Subject: Added HostConfig class. Changed SimpleHost to use it. BUG=none TEST=unittests Review URL: http://codereview.chromium.org/2810002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49852 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/simple_host_process.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'remoting/host/simple_host_process.cc') 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 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 host - = new remoting::ChromotingHost(username, auth_token, - capturer.release(), - encoder.release(), - executor.release(), - &host_done); + scoped_refptr host = + new remoting::ChromotingHost(config, + capturer.release(), + encoder.release(), + executor.release(), + &host_done); host->Run(); host_done.Wait(); return 0; -- cgit v1.1