summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_stub_fake.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/host_stub_fake.cc')
-rw-r--r--remoting/host/host_stub_fake.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/remoting/host/host_stub_fake.cc b/remoting/host/host_stub_fake.cc
index 2e3fc76..895b21a 100644
--- a/remoting/host/host_stub_fake.cc
+++ b/remoting/host/host_stub_fake.cc
@@ -3,10 +3,18 @@
// found in the LICENSE file.
#include "base/task.h"
+#include "remoting/host/chromoting_host.h"
#include "remoting/host/host_stub_fake.h"
+#include "remoting/proto/auth.pb.h"
+#include "remoting/protocol/client_stub.h"
+#include "remoting/protocol/connection_to_client.h"
namespace remoting {
+HostStubFake::HostStubFake(ChromotingHost* host)
+ : host_(host) {
+}
+
void HostStubFake::SuggestResolution(
const protocol::SuggestResolutionRequest* msg, Task* done) {
done->Run();
@@ -17,6 +25,12 @@ void HostStubFake::BeginSessionRequest(
const protocol::LocalLoginCredentials* credentials, Task* done) {
done->Run();
delete done;
+
+ protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus();
+ status->set_success(true);
+ host_->connection_to_client()->client_stub()->BeginSessionResponse(
+ status, new DeleteTask<protocol::LocalLoginStatus>(status));
+ host_->LocalLoginSucceeded();
}
} // namespace remoting