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
) {}
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
;
28 LOG(WARNING
) << "Unknown status passed in: " << status_string
;
29 remote_host_status
= kRemoteHostStatusUnknown
;
34 } // namespace remoting