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

Unified Diff: content/renderer/pepper/pepper_video_encoder_host.cc

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Rebase only Created 3 years, 10 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 | « content/renderer/pepper/pepper_video_encoder_host.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_encoder_host.cc
diff --git a/content/renderer/pepper/pepper_video_encoder_host.cc b/content/renderer/pepper/pepper_video_encoder_host.cc
index 6ebe28d405399b3c90cd5d0432f4e8a3afb52bb5..35838430604eab0ce374090f9546005b8eebc7af 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.cc
+++ b/content/renderer/pepper/pepper_video_encoder_host.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
#include "base/numerics/safe_math.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -402,16 +403,16 @@ void PepperVideoEncoderHost::RequireBitstreamBuffers(
break;
}
- shm_buffers_.push_back(new ShmBuffer(i, std::move(shm)));
+ shm_buffers_.push_back(base::MakeUnique<ShmBuffer>(i, std::move(shm)));
}
// Feed buffers to the encoder.
std::vector<SerializedHandle> handles;
- for (size_t i = 0; i < shm_buffers_.size(); ++i) {
- encoder_->UseOutputBitstreamBuffer(shm_buffers_[i]->ToBitstreamBuffer());
+ for (const auto& buffer : shm_buffers_) {
+ encoder_->UseOutputBitstreamBuffer(buffer->ToBitstreamBuffer());
handles.push_back(SerializedHandle(
renderer_ppapi_host_->ShareSharedMemoryHandleWithRemote(
- shm_buffers_[i]->shm->handle()),
+ buffer->shm->handle()),
output_buffer_size));
}
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698