Chromium Code Reviews| 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; |