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

Unified Diff: remoting/protocol/message_serialization.cc

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
Patch Set: Created 5 years 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/protocol/message_reader.h ('k') | remoting/protocol/monitored_video_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_serialization.cc
diff --git a/remoting/protocol/message_serialization.cc b/remoting/protocol/message_serialization.cc
index 435baf94cfa8e9bd16593ae2fa7793a635b76b98..9dab710e1a37e001a239dd415287e5dba036b23e 100644
--- a/remoting/protocol/message_serialization.cc
+++ b/remoting/protocol/message_serialization.cc
@@ -4,7 +4,8 @@
#include "remoting/protocol/message_serialization.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/containers/hash_tables.h"
#include "base/logging.h"
#include "net/base/io_buffer.h"
@@ -16,13 +17,13 @@ namespace protocol {
scoped_refptr<net::IOBufferWithSize> SerializeAndFrameMessage(
const google::protobuf::MessageLite& msg) {
// Create a buffer with 4 extra bytes. This is used as prefix to write an
- // int32 of the serialized message size for framing.
- const int kExtraBytes = sizeof(int32);
+ // int32_t of the serialized message size for framing.
+ const int kExtraBytes = sizeof(int32_t);
int size = msg.ByteSize() + kExtraBytes;
scoped_refptr<net::IOBufferWithSize> buffer(new net::IOBufferWithSize(size));
rtc::SetBE32(buffer->data(), msg.GetCachedSize());
msg.SerializeWithCachedSizesToArray(
- reinterpret_cast<uint8*>(buffer->data()) + kExtraBytes);
+ reinterpret_cast<uint8_t*>(buffer->data()) + kExtraBytes);
return buffer;
}
« no previous file with comments | « remoting/protocol/message_reader.h ('k') | remoting/protocol/monitored_video_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698