Adding Test Fixture for initial test cases for the App Remoting Test Driver. Also...
[chromium-blink-merge.git] / remoting / test / remote_host_info.cc
blob0383745593c16a26bc423ff39bd5eb6a6bd6bbe7
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "remoting/test/remote_host_info.h"
7 #include "base/logging.h"
9 namespace remoting {
10 namespace test {
12 RemoteHostInfo::RemoteHostInfo() :
13 remote_host_status(kRemoteHostStatusUnknown) {}
15 RemoteHostInfo::~RemoteHostInfo() {}
17 bool RemoteHostInfo::IsReadyForConnection() const {
18 return (remote_host_status == kRemoteHostStatusReady);
21 void RemoteHostInfo::SetRemoteHostStatusFromString(
22 const std::string& status_string) {
23 if (status_string == "done") {
24 remote_host_status = kRemoteHostStatusReady;
25 } else if (status_string == "pending") {
26 remote_host_status = kRemoteHostStatusPending;
27 } else {
28 LOG(WARNING) << "Unknown status passed in: " << status_string;
29 remote_host_status = kRemoteHostStatusUnknown;
33 } // namespace test
34 } // namespace remoting