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

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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: content/common/gpu/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index a7844678001fe513535d9ac6d3266bdafe0c2bab..b49a5b29aeee0cbba026f6b0bb05028ff8322c28 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -25,7 +25,7 @@ GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost(
CommandBufferProxyImpl* impl)
: channel_(channel),
decoder_route_id_(MSG_ROUTING_NONE),
- client_(NULL),
+ client_(nullptr),
impl_(impl),
weak_this_factory_(this) {
DCHECK(channel_);
@@ -73,7 +73,7 @@ void GpuVideoDecodeAcceleratorHost::OnChannelError() {
if (channel_) {
if (decoder_route_id_ != MSG_ROUTING_NONE)
channel_->RemoveRoute(decoder_route_id_);
- channel_ = NULL;
+ channel_ = nullptr;
}
DLOG(ERROR) << "OnChannelError()";
PostNotifyError(PLATFORM_FAILURE);
@@ -173,13 +173,13 @@ void GpuVideoDecodeAcceleratorHost::Destroy() {
DCHECK(CalledOnValidThread());
if (channel_)
Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_));
- client_ = NULL;
+ client_ = nullptr;
delete this;
}
void GpuVideoDecodeAcceleratorHost::OnWillDeleteImpl() {
DCHECK(CalledOnValidThread());
- impl_ = NULL;
+ impl_ = nullptr;
// The CommandBufferProxyImpl is going away; error out this VDA.
OnChannelError();
@@ -261,7 +261,7 @@ void GpuVideoDecodeAcceleratorHost::OnNotifyError(uint32 error) {
// Client::NotifyError() may Destroy() |this|, so calling it needs to be the
// last thing done on this stack!
- media::VideoDecodeAccelerator::Client* client = NULL;
+ media::VideoDecodeAccelerator::Client* client = nullptr;
std::swap(client, client_);
client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error));
}

Powered by Google App Engine
This is Rietveld 408576698