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

Side by Side Diff: remoting/test/host_info.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_TEST_HOST_INFO_H_ 5 #ifndef REMOTING_TEST_HOST_INFO_H_
6 #define REMOTING_TEST_HOST_INFO_H_ 6 #define REMOTING_TEST_HOST_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "remoting/test/connection_info.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 namespace test { 15 namespace test {
15 16
16 enum HostStatus { 17 enum HostStatus {
17 kHostStatusOnline, 18 kHostStatusOnline,
18 kHostStatusOffline 19 kHostStatusOffline
19 }; 20 };
20 21
21 struct HostInfo { 22 struct HostInfo {
22 HostInfo(); 23 HostInfo();
23 ~HostInfo(); 24 ~HostInfo();
24 25
25 bool ParseHostInfo(const base::DictionaryValue& host_info); 26 bool ParseHostInfo(const base::DictionaryValue& host_info);
26 27
28 // Returns true if the remote host is ready to accept connections.
29 bool IsReadyForConnection() const;
30
31 // Generates connection information to establish a chromoting connection.
32 ConnectionInfo GenerateConnectionInfo(const std::string& access_token,
33 const std::string& user_name,
34 const std::string& pin) const;
35
27 std::string host_id; 36 std::string host_id;
28 std::string host_jid; 37 std::string host_jid;
29 std::string host_name; 38 std::string host_name;
30 HostStatus status = kHostStatusOffline; 39 HostStatus status = kHostStatusOffline;
31 std::string offline_reason; 40 std::string offline_reason;
32 std::string public_key; 41 std::string public_key;
33 std::vector<std::string> token_url_patterns; 42 std::vector<std::string> token_url_patterns;
34 }; 43 };
35 44
36 } // namespace test 45 } // namespace test
37 } // namespace remoting 46 } // namespace remoting
38 47
39 #endif // REMOTING_TEST_HOST_INFO_H_ 48 #endif // REMOTING_TEST_HOST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698