summaryrefslogtreecommitdiffstats
path: root/remoting/host/simple_host_process.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 23:00:26 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 23:00:26 +0000
commit34f09f1a76bcb5391a602928269272a4ba9aa1c0 (patch)
tree2aae553ab047d74263b6f89b62fc0a4eb0750dfa /remoting/host/simple_host_process.cc
parent565669351555e4183fbdf23c97842aa3c5841805 (diff)
downloadchromium_src-34f09f1a76bcb5391a602928269272a4ba9aa1c0.zip
chromium_src-34f09f1a76bcb5391a602928269272a4ba9aa1c0.tar.gz
chromium_src-34f09f1a76bcb5391a602928269272a4ba9aa1c0.tar.bz2
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
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;