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

Unified Diff: ppapi/proxy/video_encoder_resource.cc

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr 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 | « ppapi/proxy/video_encoder_resource.h ('k') | ppapi/proxy/video_encoder_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/video_encoder_resource.cc
diff --git a/ppapi/proxy/video_encoder_resource.cc b/ppapi/proxy/video_encoder_resource.cc
index 4af703a22e13cc8c2d9982b47bf7b32d674986cf..89dd9f1200372f130f6e37fe16e4735ebcb112dd 100644
--- a/ppapi/proxy/video_encoder_resource.cc
+++ b/ppapi/proxy/video_encoder_resource.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
#include "base/numerics/safe_conversions.h"
#include "ppapi/c/pp_array_output.h"
@@ -58,8 +59,9 @@ std::vector<PP_VideoProfileDescription_0_1> PP_VideoProfileDescriptionTo_0_1(
} // namespace
-VideoEncoderResource::ShmBuffer::ShmBuffer(uint32_t id,
- scoped_ptr<base::SharedMemory> shm)
+VideoEncoderResource::ShmBuffer::ShmBuffer(
+ uint32_t id,
+ std::unique_ptr<base::SharedMemory> shm)
: id(id), shm(std::move(shm)) {}
VideoEncoderResource::ShmBuffer::~ShmBuffer() {
@@ -349,7 +351,7 @@ void VideoEncoderResource::OnPluginMsgGetVideoFramesReply(
if (!buffer_manager_.SetBuffers(
frame_count, frame_length,
- make_scoped_ptr(new base::SharedMemory(buffer_handle, false)),
+ base::WrapUnique(new base::SharedMemory(buffer_handle, false)),
true)) {
NotifyError(PP_ERROR_FAILED);
return;
@@ -396,7 +398,7 @@ void VideoEncoderResource::OnPluginMsgBitstreamBuffers(
}
for (uint32_t i = 0; i < shm_handles.size(); ++i) {
- scoped_ptr<base::SharedMemory> shm(
+ std::unique_ptr<base::SharedMemory> shm(
new base::SharedMemory(shm_handles[i], true));
CHECK(shm->Map(buffer_length));
« no previous file with comments | « ppapi/proxy/video_encoder_resource.h ('k') | ppapi/proxy/video_encoder_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698