diff options
author | joedow <joedow@chromium.org> | 2015-03-05 18:41:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-06 02:41:58 +0000 |
commit | dd5660bd5b757e906eee390b83c8a7585822a60d (patch) | |
tree | 32592da2e604f96a50e180e2e0cdecc60c56eb29 /remoting/test/remote_host_info.cc | |
parent | dbf8bfd7fa34d69e880f0b8073a0441f439bf08a (diff) | |
download | chromium_src-dd5660bd5b757e906eee390b83c8a7585822a60d.zip chromium_src-dd5660bd5b757e906eee390b83c8a7585822a60d.tar.gz chromium_src-dd5660bd5b757e906eee390b83c8a7585822a60d.tar.bz2 |
Adding the RemoteHostInfo and RemoteHostInfoFetcher classes and unittests for use with the App Remoting Test Driver.
This changelist also includes some lint error cleanup and updating of
assertions in the unittest code to remove the c_str() calls.
BUG=462307
Review URL: https://codereview.chromium.org/962763002
Cr-Commit-Position: refs/heads/master@{#319396}
Diffstat (limited to 'remoting/test/remote_host_info.cc')
-rw-r--r-- | remoting/test/remote_host_info.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/remoting/test/remote_host_info.cc b/remoting/test/remote_host_info.cc new file mode 100644 index 0000000..0383745 --- /dev/null +++ b/remoting/test/remote_host_info.cc @@ -0,0 +1,34 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "remoting/test/remote_host_info.h" + +#include "base/logging.h" + +namespace remoting { +namespace test { + +RemoteHostInfo::RemoteHostInfo() : + remote_host_status(kRemoteHostStatusUnknown) {} + +RemoteHostInfo::~RemoteHostInfo() {} + +bool RemoteHostInfo::IsReadyForConnection() const { + return (remote_host_status == kRemoteHostStatusReady); +} + +void RemoteHostInfo::SetRemoteHostStatusFromString( + const std::string& status_string) { + if (status_string == "done") { + remote_host_status = kRemoteHostStatusReady; + } else if (status_string == "pending") { + remote_host_status = kRemoteHostStatusPending; + } else { + LOG(WARNING) << "Unknown status passed in: " << status_string; + remote_host_status = kRemoteHostStatusUnknown; + } +} + +} // namespace test +} // namespace remoting |