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

Unified Diff: chromecast/renderer/media/media_pipeline_proxy.cc

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chromecast/renderer/media/media_pipeline_proxy.h ('k') | chromecast/renderer/media/video_pipeline_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/media/media_pipeline_proxy.cc
diff --git a/chromecast/renderer/media/media_pipeline_proxy.cc b/chromecast/renderer/media/media_pipeline_proxy.cc
index c0835f346aa397a99bbedd0a8586b5e1f1a0b17e..4196b807d36439c5e7c8897eefb29278cd0e8e0e 100644
--- a/chromecast/renderer/media/media_pipeline_proxy.cc
+++ b/chromecast/renderer/media/media_pipeline_proxy.cc
@@ -26,7 +26,7 @@ namespace media {
// as the media channel proxy.
class MediaPipelineProxyInternal {
public:
- static void Release(scoped_ptr<MediaPipelineProxyInternal> proxy);
+ static void Release(std::unique_ptr<MediaPipelineProxyInternal> proxy);
explicit MediaPipelineProxyInternal(
scoped_refptr<MediaChannelProxy> media_channel_proxy);
@@ -59,7 +59,7 @@ class MediaPipelineProxyInternal {
// static
void MediaPipelineProxyInternal::Release(
- scoped_ptr<MediaPipelineProxyInternal> proxy) {
+ std::unique_ptr<MediaPipelineProxyInternal> proxy) {
proxy->Shutdown();
}
@@ -99,16 +99,15 @@ void MediaPipelineProxyInternal::SetClient(const MediaPipelineClient& client) {
void MediaPipelineProxyInternal::SetCdm(int render_frame_id, int cdm_id) {
DCHECK(thread_checker_.CalledOnValidThread());
- bool success = media_channel_proxy_->Send(scoped_ptr<IPC::Message>(
- new CmaHostMsg_SetCdm(media_channel_proxy_->GetId(),
- render_frame_id,
- cdm_id)));
+ bool success = media_channel_proxy_->Send(
+ std::unique_ptr<IPC::Message>(new CmaHostMsg_SetCdm(
+ media_channel_proxy_->GetId(), render_frame_id, cdm_id)));
LOG_IF(ERROR, !success) << "Failed to send SetCdm=" << cdm_id;
}
void MediaPipelineProxyInternal::Flush(const base::Closure& flush_cb) {
DCHECK(thread_checker_.CalledOnValidThread());
- bool success = media_channel_proxy_->Send(scoped_ptr<IPC::Message>(
+ bool success = media_channel_proxy_->Send(std::unique_ptr<IPC::Message>(
new CmaHostMsg_Flush(media_channel_proxy_->GetId())));
if (!success) {
LOG(ERROR) << "Failed to send Flush";
@@ -120,7 +119,7 @@ void MediaPipelineProxyInternal::Flush(const base::Closure& flush_cb) {
void MediaPipelineProxyInternal::Stop() {
DCHECK(thread_checker_.CalledOnValidThread());
- bool success = media_channel_proxy_->Send(scoped_ptr<IPC::Message>(
+ bool success = media_channel_proxy_->Send(std::unique_ptr<IPC::Message>(
new CmaHostMsg_Stop(media_channel_proxy_->GetId())));
if (!success)
client_.error_cb.Run(::media::PIPELINE_ERROR_ABORT);
@@ -128,17 +127,16 @@ void MediaPipelineProxyInternal::Stop() {
void MediaPipelineProxyInternal::StartPlayingFrom(const base::TimeDelta& time) {
DCHECK(thread_checker_.CalledOnValidThread());
- bool success = media_channel_proxy_->Send(scoped_ptr<IPC::Message>(
- new CmaHostMsg_StartPlayingFrom(
- media_channel_proxy_->GetId(), time)));
+ bool success = media_channel_proxy_->Send(std::unique_ptr<IPC::Message>(
+ new CmaHostMsg_StartPlayingFrom(media_channel_proxy_->GetId(), time)));
if (!success)
client_.error_cb.Run(::media::PIPELINE_ERROR_ABORT);
}
void MediaPipelineProxyInternal::SetPlaybackRate(double playback_rate) {
DCHECK(thread_checker_.CalledOnValidThread());
- media_channel_proxy_->Send(scoped_ptr<IPC::Message>(
- new CmaHostMsg_SetPlaybackRate(
+ media_channel_proxy_->Send(
+ std::unique_ptr<IPC::Message>(new CmaHostMsg_SetPlaybackRate(
media_channel_proxy_->GetId(), playback_rate)));
}
@@ -204,7 +202,7 @@ VideoPipelineProxy* MediaPipelineProxy::GetVideoPipeline() const {
void MediaPipelineProxy::InitializeAudio(
const ::media::AudioDecoderConfig& config,
- scoped_ptr<CodedFrameProvider> frame_provider,
+ std::unique_ptr<CodedFrameProvider> frame_provider,
const ::media::PipelineStatusCB& status_cb) {
DCHECK(thread_checker_.CalledOnValidThread());
has_audio_ = true;
@@ -213,7 +211,7 @@ void MediaPipelineProxy::InitializeAudio(
void MediaPipelineProxy::InitializeVideo(
const std::vector<::media::VideoDecoderConfig>& configs,
- scoped_ptr<CodedFrameProvider> frame_provider,
+ std::unique_ptr<CodedFrameProvider> frame_provider,
const ::media::PipelineStatusCB& status_cb) {
DCHECK(thread_checker_.CalledOnValidThread());
has_video_ = true;
« no previous file with comments | « chromecast/renderer/media/media_pipeline_proxy.h ('k') | chromecast/renderer/media/video_pipeline_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698