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

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

Issue 2211613002: Add AssignmentSource to BlimpClientContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge origin/master Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
6 #define BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "net/base/ip_endpoint.h"
12
13 namespace net {
14 class X509Certificate;
15 }
16
17 namespace blimp {
18 namespace client {
19
20 // A Java counterpart will be generated for this enum.
21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.blimp_public.session
22 enum AssignmentRequestResult {
23 ASSIGNMENT_REQUEST_RESULT_UNKNOWN = 0,
24 ASSIGNMENT_REQUEST_RESULT_OK = 1,
25 ASSIGNMENT_REQUEST_RESULT_BAD_REQUEST = 2,
26 ASSIGNMENT_REQUEST_RESULT_BAD_RESPONSE = 3,
27 ASSIGNMENT_REQUEST_RESULT_INVALID_PROTOCOL_VERSION = 4,
28 ASSIGNMENT_REQUEST_RESULT_EXPIRED_ACCESS_TOKEN = 5,
29 ASSIGNMENT_REQUEST_RESULT_USER_INVALID = 6,
30 ASSIGNMENT_REQUEST_RESULT_OUT_OF_VMS = 7,
31 ASSIGNMENT_REQUEST_RESULT_SERVER_ERROR = 8,
32 ASSIGNMENT_REQUEST_RESULT_SERVER_INTERRUPTED = 9,
33 ASSIGNMENT_REQUEST_RESULT_NETWORK_FAILURE = 10,
34 ASSIGNMENT_REQUEST_RESULT_INVALID_CERT = 11,
35 };
36
37 // An Assignment contains the configuration data needed for a client
38 // to connect to the engine.
39 struct Assignment {
40 enum TransportProtocol {
41 UNKNOWN = 0,
42 SSL = 1,
43 TCP = 2,
44 };
45
46 Assignment();
47 Assignment(const Assignment& other);
48 ~Assignment();
49
50 // Returns true if the net::IPEndPoint has an unspecified IP, port, or
Kevin M 2016/08/09 21:00:34 Returns false?
nyquist 2016/08/10 01:19:52 Ouch! Done.
51 // transport protocol.
52 bool IsValid() const;
53
54 // Specifies the transport to use to connect to the engine.
55 TransportProtocol transport_protocol;
56
57 // Specifies the IP address and port on which to reach the engine.
58 net::IPEndPoint engine_endpoint;
59
60 // Used to authenticate to the specified engine.
61 std::string client_token;
62
63 // Specifies the X.509 certificate that the engine must report.
Kevin M 2016/08/09 21:00:34 "must report" is a little misleading - it's more t
nyquist 2016/08/10 01:19:52 Agreed! Done.
64 scoped_refptr<net::X509Certificate> cert;
65 };
66
67 } // namespace client
68 } // namespace blimp
69
70 #endif // BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698