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

Unified Diff: remoting/protocol/message_decoder_unittest.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_decoder.cc ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_decoder_unittest.cc
diff --git a/remoting/protocol/message_decoder_unittest.cc b/remoting/protocol/message_decoder_unittest.cc
index 2c1c56ad4e5a2aed7ff6185d67327b588681b6f7..44c7764c9b7d0526ad331336f14cd8531afb8122 100644
--- a/remoting/protocol/message_decoder_unittest.cc
+++ b/remoting/protocol/message_decoder_unittest.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
@@ -27,7 +30,7 @@ static void AppendMessage(const EventMessage& msg,
}
// Construct and prepare data in the |output_stream|.
-static void PrepareData(uint8** buffer, int* size) {
+static void PrepareData(uint8_t** buffer, int* size) {
// Contains all encoded messages.
std::string encoded_data;
@@ -41,16 +44,16 @@ static void PrepareData(uint8** buffer, int* size) {
}
*size = encoded_data.length();
- *buffer = new uint8[*size];
+ *buffer = new uint8_t[*size];
memcpy(*buffer, encoded_data.c_str(), *size);
}
void SimulateReadSequence(const int read_sequence[], int sequence_size) {
// Prepare encoded data for testing.
int size;
- uint8* test_data;
+ uint8_t* test_data;
PrepareData(&test_data, &size);
- scoped_ptr<uint8[]> memory_deleter(test_data);
+ scoped_ptr<uint8_t[]> memory_deleter(test_data);
// Then simulate using MessageDecoder to decode variable
// size of encoded data.
« no previous file with comments | « remoting/protocol/message_decoder.cc ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698