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

Unified Diff: chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
Index: chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
diff --git a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
index ce17cbfd64c67708e8bf72c29180a983db096175..6789ef843c40964e68dba5007d05a87df9f9bf73 100644
--- a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
+++ b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
@@ -7,12 +7,12 @@
#include <algorithm>
#include <cmath>
+#include <memory>
#include <vector>
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -156,7 +156,7 @@ class TestPatternReceiver : public media::cast::InProcessReceiver {
}
// Invoked by InProcessReceiver for each received audio frame.
- void OnAudioFrame(scoped_ptr<media::AudioBus> audio_frame,
+ void OnAudioFrame(std::unique_ptr<media::AudioBus> audio_frame,
const base::TimeTicks& playout_time,
bool is_continuous) override {
DCHECK(cast_env()->CurrentlyOn(media::cast::CastEnvironment::MAIN));
@@ -296,7 +296,7 @@ class TestPatternReceiver : public media::cast::InProcessReceiver {
if (region.IsEmpty())
return 0;
const size_t num_values = region.size().GetArea();
- scoped_ptr<uint8_t[]> values(new uint8_t[num_values]);
+ std::unique_ptr<uint8_t[]> values(new uint8_t[num_values]);
for (int y = 0; y < region.height(); ++y) {
memcpy(values.get() + y * region.width(),
data + (region.y() + y) * stride + region.x(),
@@ -344,7 +344,7 @@ class CastStreamingApiTestWithPixelOutput : public CastStreamingApiTest {
#define MAYBE_EndToEnd DISABLED_EndToEnd
#endif
IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, MAYBE_EndToEnd) {
- scoped_ptr<net::UDPServerSocket> receive_socket(
+ std::unique_ptr<net::UDPServerSocket> receive_socket(
new net::UDPServerSocket(NULL, net::NetLog::Source()));
receive_socket->AllowAddressReuse();
ASSERT_EQ(net::OK, receive_socket->Listen(GetFreeLocalPort()));

Powered by Google App Engine
This is Rietveld 408576698