Chromium Code Reviews| Index: remoting/test/remote_host_info.cc |
| diff --git a/remoting/test/remote_host_info.cc b/remoting/test/remote_host_info.cc |
| index 62883902ce4bf144a884d1caabdbc465e774e6d0..8e180b89e62e75ee7deafea79c53eb4974072160 100644 |
| --- a/remoting/test/remote_host_info.cc |
| +++ b/remoting/test/remote_host_info.cc |
| @@ -2,10 +2,19 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| + |
|
joedow
2015/07/17 23:26:30
remove extra newline
tonychun
2015/07/20 14:29:17
Done.
|
| +#include "base/strings/string_split.h" |
|
joedow
2015/07/17 23:26:30
remove string_split header
tonychun
2015/07/20 14:29:17
Done.
|
| +#include "remoting/protocol/authentication_method.h" |
| #include "remoting/test/remote_host_info.h" |
| #include "base/logging.h" |
| +namespace { |
| +const char kAppRemotingCapabilities[] = |
| + "rateLimitResizeRequests desktopShape sendInitialResolution googleDrive"; |
| +const char kFakeHostPublicKey[] = "FAKE_HOST_PUBLIC_KEY"; |
| +} |
| + |
| namespace remoting { |
| namespace test { |
| @@ -17,7 +26,7 @@ RemoteHostInfo::~RemoteHostInfo() { |
| } |
| bool RemoteHostInfo::IsReadyForConnection() const { |
| - return (remote_host_status == kRemoteHostStatusReady); |
| + return remote_host_status == kRemoteHostStatusReady; |
| } |
| void RemoteHostInfo::SetRemoteHostStatusFromString( |
| @@ -32,5 +41,23 @@ void RemoteHostInfo::SetRemoteHostStatusFromString( |
| } |
| } |
| +ConnectionSetupInfo RemoteHostInfo::GenerateConnectionSetupInfo( |
| + const std::string& access_token, |
| + const std::string& user_name) const { |
| + ConnectionSetupInfo connection_setup_info; |
| + connection_setup_info.access_token = access_token; |
| + connection_setup_info.authorization_code = authorization_code; |
| + connection_setup_info.capabilities = kAppRemotingCapabilities; |
| + connection_setup_info.host_id = host_id; |
| + connection_setup_info.host_jid = host_jid; |
| + connection_setup_info.public_key = kFakeHostPublicKey; |
| + connection_setup_info.shared_secret = shared_secret; |
| + connection_setup_info.user_name = user_name; |
| + connection_setup_info.auth_methods.push_back( |
| + protocol::AuthenticationMethod::ThirdParty()); |
|
joedow
2015/07/17 23:26:30
Please add some newlines as in host_info.cc
tonychun
2015/07/20 14:29:17
Done.
|
| + |
| + return connection_setup_info; |
| +} |
| + |
| } // namespace test |
| } // namespace remoting |