Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: remoting/test/host_info.cc

Issue 1237093004: Support for connecting to localhost on the chromoting test driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored App Remoting and Chromoting code to share StartConnection method. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/test/host_info.cc
diff --git a/remoting/test/host_info.cc b/remoting/test/host_info.cc
index 341829f662e5f40815c61b2b29e817de77cc8172..595c1d63a3e371444323552c580d0207c89225f3 100644
--- a/remoting/test/host_info.cc
+++ b/remoting/test/host_info.cc
@@ -6,6 +6,11 @@
#include "base/logging.h"
+namespace {
+const char kChromotingAuthenticationMethods[] =
+ "spake2_pair,spake2_plain,spake2_hmac,third_party";
+}
+
namespace remoting {
namespace test {
@@ -70,5 +75,26 @@ bool HostInfo::ParseHostInfo(const base::DictionaryValue& host_info) {
return true;
}
+bool HostInfo::IsReadyForConnection() const {
+ return status == kHostStatusOnline;
anandc 2015/07/15 21:12:29 If all this is doing is this 1 check, why have a s
tonychun 2015/07/16 23:12:08 Done.
+}
+
+ConnectionInfo HostInfo::GenerateConnectionInfo(
+ const std::string& access_token,
+ const std::string& user_name,
+ const std::string& pin) const {
+ ConnectionInfo connection_info;
+ connection_info.access_token = access_token;
+ connection_info.auth_methods_str = kChromotingAuthenticationMethods;
+ connection_info.host_id = host_id;
+ connection_info.host_jid = host_jid;
+ connection_info.host_name = host_name;
+ connection_info.pin = pin;
+ connection_info.public_key = public_key;
+ connection_info.user_name = user_name;
+
+ return connection_info;
+}
+
} // namespace test
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698