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

Unified Diff: remoting/base/compound_buffer_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/base/chromium_url_request.cc ('k') | remoting/base/rsa_key_pair.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/compound_buffer_unittest.cc
diff --git a/remoting/base/compound_buffer_unittest.cc b/remoting/base/compound_buffer_unittest.cc
index 031365a85d9c02ae7a61b7ac15171eee90c0b6d5..c64b7ea2908ec1c6e889acbc72b76c70a65dd294 100644
--- a/remoting/base/compound_buffer_unittest.cc
+++ b/remoting/base/compound_buffer_unittest.cc
@@ -2,16 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/base/compound_buffer.h"
+
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/bind.h"
#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
#include "net/base/io_buffer.h"
-#include "remoting/base/compound_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
using net::IOBuffer;
@@ -140,14 +141,14 @@ class CompoundBufferTest : public testing::Test {
static void ReadString(CompoundBufferInputStream* input,
const std::string& str) {
SCOPED_TRACE(str);
- scoped_ptr<char[]> buffer(new char[str.size() + 1]);
+ std::unique_ptr<char[]> buffer(new char[str.size() + 1]);
buffer[str.size()] = '\0';
EXPECT_EQ(ReadFromInput(input, buffer.get(), str.size()), str.size());
EXPECT_STREQ(str.data(), buffer.get());
}
// Construct and prepare data in the |buffer|.
- static void PrepareData(scoped_ptr<CompoundBuffer>* buffer) {
+ static void PrepareData(std::unique_ptr<CompoundBuffer>* buffer) {
static const std::string kTestData =
"Hello world!"
"This is testing"
@@ -261,7 +262,7 @@ TEST_F(CompoundBufferTest, CopyFrom) {
}
TEST_F(CompoundBufferTest, InputStream) {
- scoped_ptr<CompoundBuffer> buffer;
+ std::unique_ptr<CompoundBuffer> buffer;
PrepareData(&buffer);
CompoundBufferInputStream stream(buffer.get());
« no previous file with comments | « remoting/base/chromium_url_request.cc ('k') | remoting/base/rsa_key_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698