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

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

Issue 1830433002: Adding the message writing class used for remote_security_key STDOUT communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@messages
Patch Set: Fixing non-windows linking error 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
« no previous file with comments | « remoting/host/security_key/security_key_message.h ('k') | remoting/remoting_host_srcs.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/security_key/security_key_message.cc
diff --git a/remoting/host/security_key/security_key_message.cc b/remoting/host/security_key/security_key_message.cc
index 9c02821eb81091f9efda6d09f3643454eb174109..34de69a98241482dd0b8663097cc23de7332cc6a 100644
--- a/remoting/host/security_key/security_key_message.cc
+++ b/remoting/host/security_key/security_key_message.cc
@@ -11,12 +11,14 @@ namespace {
// Limit remote security key messages to 256KB.
const uint32_t kMaxSecurityKeyMessageByteCount = 256 * 1024;
-const int kRemoteSecurityKeyMessageControlCodeByteCount = 1;
-
} // namespace
namespace remoting {
+const int SecurityKeyMessage::kHeaderSizeBytes = 4;
+
+const int SecurityKeyMessage::kMessageTypeSizeBytes = 1;
+
SecurityKeyMessage::SecurityKeyMessage() {}
SecurityKeyMessage::~SecurityKeyMessage() {}
@@ -75,7 +77,7 @@ bool SecurityKeyMessage::ParseMessage(const std::string& message_data) {
}
payload_.clear();
- if (message_data.size() > kRemoteSecurityKeyMessageControlCodeByteCount) {
+ if (message_data.size() > kMessageTypeSizeBytes) {
payload_ = message_data.substr(1);
}
« no previous file with comments | « remoting/host/security_key/security_key_message.h ('k') | remoting/remoting_host_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698