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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/client/public/blimp_client_context_delegate.h ('k') | blimp/client/public/session/assignment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/public/session/assignment.h
diff --git a/blimp/client/public/session/assignment.h b/blimp/client/public/session/assignment.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea755158d80a3694d12f8e8f0f76ca8a957e369e
--- /dev/null
+++ b/blimp/client/public/session/assignment.h
@@ -0,0 +1,70 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
+#define BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+#include "net/base/ip_endpoint.h"
+
+namespace net {
+class X509Certificate;
+}
+
+namespace blimp {
+namespace client {
+
+// A Java counterpart will be generated for this enum.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.blimp_public.session
+enum AssignmentRequestResult {
+ ASSIGNMENT_REQUEST_RESULT_UNKNOWN = 0,
+ ASSIGNMENT_REQUEST_RESULT_OK = 1,
+ ASSIGNMENT_REQUEST_RESULT_BAD_REQUEST = 2,
+ ASSIGNMENT_REQUEST_RESULT_BAD_RESPONSE = 3,
+ ASSIGNMENT_REQUEST_RESULT_INVALID_PROTOCOL_VERSION = 4,
+ ASSIGNMENT_REQUEST_RESULT_EXPIRED_ACCESS_TOKEN = 5,
+ ASSIGNMENT_REQUEST_RESULT_USER_INVALID = 6,
+ ASSIGNMENT_REQUEST_RESULT_OUT_OF_VMS = 7,
+ ASSIGNMENT_REQUEST_RESULT_SERVER_ERROR = 8,
+ ASSIGNMENT_REQUEST_RESULT_SERVER_INTERRUPTED = 9,
+ ASSIGNMENT_REQUEST_RESULT_NETWORK_FAILURE = 10,
+ ASSIGNMENT_REQUEST_RESULT_INVALID_CERT = 11,
+};
+
+// An Assignment contains the configuration data needed for a client
+// to connect to the engine.
+struct Assignment {
+ enum TransportProtocol {
+ UNKNOWN = 0,
+ SSL = 1,
+ TCP = 2,
+ };
+
+ Assignment();
+ Assignment(const Assignment& other);
+ ~Assignment();
+
+ // Returns false if the net::IPEndPoint has an unspecified IP, port, or
+ // transport protocol.
+ bool IsValid() const;
+
+ // Specifies the transport to use to connect to the engine.
+ TransportProtocol transport_protocol;
+
+ // Specifies the IP address and port on which to reach the engine.
+ net::IPEndPoint engine_endpoint;
+
+ // Used to authenticate to the specified engine.
+ std::string client_token;
+
+ // Specifies the engine's X.509 certificate.
+ scoped_refptr<net::X509Certificate> cert;
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_PUBLIC_SESSION_ASSIGNMENT_H_
« no previous file with comments | « blimp/client/public/blimp_client_context_delegate.h ('k') | blimp/client/public/session/assignment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698