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"
12 RemoteHostInfo::RemoteHostInfo()
13 : remote_host_status(kRemoteHostStatusUnknown
) {
16 RemoteHostInfo::~RemoteHostInfo() {
19 bool RemoteHostInfo::IsReadyForConnection() const {
20 return (remote_host_status
== kRemoteHostStatusReady
);
23 void RemoteHostInfo::SetRemoteHostStatusFromString(
24 const std::string
& status_string
) {
25 if (status_string
== "done") {
26 remote_host_status
= kRemoteHostStatusReady
;
27 } else if (status_string
== "pending") {
28 remote_host_status
= kRemoteHostStatusPending
;
30 LOG(WARNING
) << "Unknown status passed in: " << status_string
;
31 remote_host_status
= kRemoteHostStatusUnknown
;
36 } // namespace remoting