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

Unified Diff: remoting/host/security_key/remote_security_key_messages.cc

Issue 1821393002: Adding the message definitions for the remote_security_key STDIO communication classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup berfore review Created 4 years, 9 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/host/security_key/remote_security_key_messages.cc
diff --git a/remoting/host/security_key/remote_security_key_messages.cc b/remoting/host/security_key/remote_security_key_messages.cc
new file mode 100644
index 0000000000000000000000000000000000000000..269488bba71c53c12ad37352f048449ceb310af5
--- /dev/null
+++ b/remoting/host/security_key/remote_security_key_messages.cc
@@ -0,0 +1,31 @@
+// 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.
+
+#include "remoting/host/security_key/remote_security_key_messages.h"
+
+// Limit remote security key messages to 256KB.
+const uint32_t remoting::kMaxRemoteSecurityKeyMessageByteCount = 256 * 1024;
Sergey Ulanov 2016/03/23 19:07:25 I think all these constants can be moved to the .h
joedow 2016/03/24 17:48:08 Done.
+
+const int remoting::kRemoteSecurityKeyMessageHeaderByteCount = sizeof(uint32_t);
+const int remoting::kRemoteSecurityKeyMessageControlCodeByteCount =
+ sizeof(uint8_t);
+const int remoting::kRemoteSecurityKeyMessagePayloadByteCount =
+ static_cast<int>(remoting::kMaxRemoteSecurityKeyMessageByteCount) -
+ remoting::kRemoteSecurityKeyMessageControlCodeByteCount;
+
+// ConnectToSecurityKeyEnabledSession messages.
+const uint8_t remoting::kConnectToSecurityKeyEnabledSessionMsg = 0;
Sergey Ulanov 2016/03/23 19:07:25 I think these can be replaced with an enum.
joedow 2016/03/24 17:48:08 Done.
+const uint8_t remoting::kConnectToSecurityKeyEnabledSessionRsp = 1;
+const uint8_t remoting::kConnectToSecurityKeyEnabledSessionErr = 2;
+
+// RemoteSecurityKeyRequest messages.
+const uint8_t remoting::kRemoteSecurityKeyRequestMsg = 3;
Sergey Ulanov 2016/03/23 19:07:25 And these
joedow 2016/03/24 17:48:08 Done.
+const uint8_t remoting::kRemoteSecurityKeyRequestRsp = 4;
+const uint8_t remoting::kRemoteSecurityKeyRequestErr = 5;
+
+// Unknown command error.
+const uint8_t remoting::kRemoteSecurityKeyUnknownMessageErrorMsg = 254;
+
+// Unknown error message.
+const uint8_t remoting::kRemoteSecurityKeyUnknownErrorMsg = 255;

Powered by Google App Engine
This is Rietveld 408576698