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

Side by Side Diff: blimp/client/public/session/assignment.h

Issue 2439403003: Refactor BlimpConnection to TCPConnection (Closed)
Patch Set: Added missing Engine Transport Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
6 #define BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_ 6 #define BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 23 matching lines...) Expand all
34 ASSIGNMENT_REQUEST_RESULT_INVALID_CERT = 11, 34 ASSIGNMENT_REQUEST_RESULT_INVALID_CERT = 11,
35 }; 35 };
36 36
37 // An Assignment contains the configuration data needed for a client 37 // An Assignment contains the configuration data needed for a client
38 // to connect to the engine. 38 // to connect to the engine.
39 struct Assignment { 39 struct Assignment {
40 enum TransportProtocol { 40 enum TransportProtocol {
41 UNKNOWN = 0, 41 UNKNOWN = 0,
42 SSL = 1, 42 SSL = 1,
43 TCP = 2, 43 TCP = 2,
44 GRPC = 3,
44 }; 45 };
45 46
46 Assignment(); 47 Assignment();
47 Assignment(const Assignment& other); 48 Assignment(const Assignment& other);
48 ~Assignment(); 49 ~Assignment();
49 50
50 // Returns false if the net::IPEndPoint has an unspecified IP, port, or 51 // Returns false if the net::IPEndPoint has an unspecified IP, port, or
51 // transport protocol. 52 // transport protocol.
52 bool IsValid() const; 53 bool IsValid() const;
53 54
54 // Specifies the transport to use to connect to the engine. 55 // Specifies the transport to use to connect to the engine.
55 TransportProtocol transport_protocol; 56 TransportProtocol transport_protocol;
56 57
57 // Specifies the IP address and port on which to reach the engine. 58 // Specifies the IP address and port on which to reach the engine.
58 net::IPEndPoint engine_endpoint; 59 net::IPEndPoint engine_endpoint;
59 60
60 // Used to authenticate to the specified engine. 61 // Used to authenticate to the specified engine.
61 std::string client_auth_token; 62 std::string client_auth_token;
62 63
63 // Specifies the engine's X.509 certificate. 64 // Specifies the engine's X.509 certificate.
64 scoped_refptr<net::X509Certificate> cert; 65 scoped_refptr<net::X509Certificate> cert;
65 }; 66 };
66 67
67 } // namespace client 68 } // namespace client
68 } // namespace blimp 69 } // namespace blimp
69 70
70 #endif // BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_ 71 #endif // BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698