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

Unified Diff: remoting/protocol/message_decoder_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/protocol/message_channel_factory.h ('k') | remoting/protocol/message_pipe.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 44c7764c9b7d0526ad331336f14cd8531afb8122..25f05b89cdf26732052b8b0f15a653bcf505d86a 100644
--- a/remoting/protocol/message_decoder_unittest.cc
+++ b/remoting/protocol/message_decoder_unittest.cc
@@ -2,17 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/protocol/message_decoder.h"
+
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "remoting/proto/event.pb.h"
#include "remoting/proto/internal.pb.h"
-#include "remoting/protocol/message_decoder.h"
#include "remoting/protocol/message_serialization.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -53,7 +54,7 @@ void SimulateReadSequence(const int read_sequence[], int sequence_size) {
int size;
uint8_t* test_data;
PrepareData(&test_data, &size);
- scoped_ptr<uint8_t[]> memory_deleter(test_data);
+ std::unique_ptr<uint8_t[]> memory_deleter(test_data);
// Then simulate using MessageDecoder to decode variable
// size of encoded data.
@@ -75,7 +76,7 @@ void SimulateReadSequence(const int read_sequence[], int sequence_size) {
memcpy(buffer->data(), test_data + pos, read);
decoder.AddData(buffer, read);
while (true) {
- scoped_ptr<CompoundBuffer> message(decoder.GetNextMessage());
+ std::unique_ptr<CompoundBuffer> message(decoder.GetNextMessage());
if (!message.get())
break;
« no previous file with comments | « remoting/protocol/message_channel_factory.h ('k') | remoting/protocol/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698