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

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

Issue 2162083003: Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a GYP build error Created 4 years, 5 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/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 77614bb9ba8fb7e8d179b4ba60d3a73fe64b3916..a3a34d7edbf0455b2c822561defc7dfdec34f534 100644
--- a/remoting/host/security_key/security_key_message.cc
+++ b/remoting/host/security_key/security_key_message.cc
@@ -14,7 +14,7 @@
namespace {
-// Limit remote security key messages to 256KB.
+// Limit security key messages to 256KB.
const uint32_t kMaxSecurityKeyMessageByteCount = 256 * 1024;
} // namespace
@@ -33,30 +33,29 @@ bool SecurityKeyMessage::IsValidMessageSize(uint32_t message_size) {
return message_size > 0 && message_size <= kMaxSecurityKeyMessageByteCount;
}
-RemoteSecurityKeyMessageType SecurityKeyMessage::MessageTypeFromValue(
- int value) {
+SecurityKeyMessageType SecurityKeyMessage::MessageTypeFromValue(int value) {
// Note: The static_cast from enum value to int should be safe since the enum
// type is an unsigned 8bit value.
switch (value) {
- case static_cast<int>(RemoteSecurityKeyMessageType::CONNECT):
- case static_cast<int>(RemoteSecurityKeyMessageType::CONNECT_RESPONSE):
- case static_cast<int>(RemoteSecurityKeyMessageType::CONNECT_ERROR):
- case static_cast<int>(RemoteSecurityKeyMessageType::REQUEST):
- case static_cast<int>(RemoteSecurityKeyMessageType::REQUEST_RESPONSE):
- case static_cast<int>(RemoteSecurityKeyMessageType::REQUEST_ERROR):
- case static_cast<int>(RemoteSecurityKeyMessageType::UNKNOWN_COMMAND):
- case static_cast<int>(RemoteSecurityKeyMessageType::UNKNOWN_ERROR):
- case static_cast<int>(RemoteSecurityKeyMessageType::INVALID):
- return static_cast<RemoteSecurityKeyMessageType>(value);
+ case static_cast<int>(SecurityKeyMessageType::CONNECT):
+ case static_cast<int>(SecurityKeyMessageType::CONNECT_RESPONSE):
+ case static_cast<int>(SecurityKeyMessageType::CONNECT_ERROR):
+ case static_cast<int>(SecurityKeyMessageType::REQUEST):
+ case static_cast<int>(SecurityKeyMessageType::REQUEST_RESPONSE):
+ case static_cast<int>(SecurityKeyMessageType::REQUEST_ERROR):
+ case static_cast<int>(SecurityKeyMessageType::UNKNOWN_COMMAND):
+ case static_cast<int>(SecurityKeyMessageType::UNKNOWN_ERROR):
+ case static_cast<int>(SecurityKeyMessageType::INVALID):
+ return static_cast<SecurityKeyMessageType>(value);
default:
LOG(ERROR) << "Unknown message type passed in: " << value;
- return RemoteSecurityKeyMessageType::INVALID;
+ return SecurityKeyMessageType::INVALID;
}
}
std::unique_ptr<SecurityKeyMessage> SecurityKeyMessage::CreateMessageForTest(
- RemoteSecurityKeyMessageType type,
+ SecurityKeyMessageType type,
const std::string& payload) {
std::unique_ptr<SecurityKeyMessage> message(new SecurityKeyMessage());
message->type_ = type;
@@ -72,7 +71,7 @@ bool SecurityKeyMessage::ParseMessage(const std::string& message_data) {
// The first char of the message is the message type.
type_ = MessageTypeFromValue(message_data[0]);
- if (type_ == RemoteSecurityKeyMessageType::INVALID) {
+ if (type_ == SecurityKeyMessageType::INVALID) {
return false;
}
« no previous file with comments | « remoting/host/security_key/security_key_message.h ('k') | remoting/host/security_key/security_key_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698