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

Unified Diff: cc/layers/video_frame_provider_client_impl.cc

Issue 643583003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr in src/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foramted. 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: cc/layers/video_frame_provider_client_impl.cc
diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_frame_provider_client_impl.cc
index cf78413f679f7e64583dd0ec0f69afd84d142764..50333c12aae7d120a32b6e74d5cae07071626b1e 100644
--- a/cc/layers/video_frame_provider_client_impl.cc
+++ b/cc/layers/video_frame_provider_client_impl.cc
@@ -23,7 +23,7 @@ VideoFrameProviderClientImpl::~VideoFrameProviderClientImpl() {}
VideoFrameProviderClientImpl::VideoFrameProviderClientImpl(
VideoFrameProvider* provider)
- : active_video_layer_(NULL), provider_(provider) {
+ : active_video_layer_(nullptr), provider_(provider) {
// This only happens during a commit on the compositor thread while the main
// thread is blocked. That makes this a thread-safe call to set the video
// frame provider client that does not require a lock. The same is true of
@@ -42,15 +42,15 @@ VideoFrameProviderClientImpl::VideoFrameProviderClientImpl(
void VideoFrameProviderClientImpl::Stop() {
if (!provider_)
return;
- provider_->SetVideoFrameProviderClient(NULL);
- provider_ = NULL;
+ provider_->SetVideoFrameProviderClient(nullptr);
+ provider_ = nullptr;
}
scoped_refptr<media::VideoFrame>
VideoFrameProviderClientImpl::AcquireLockAndCurrentFrame() {
provider_lock_.Acquire(); // Balanced by call to ReleaseLock().
if (!provider_)
- return NULL;
+ return nullptr;
return provider_->GetCurrentFrame();
}
@@ -70,7 +70,7 @@ void VideoFrameProviderClientImpl::StopUsingProvider() {
// Block the provider from shutting down until this client is done
// using the frame.
base::AutoLock locker(provider_lock_);
- provider_ = NULL;
+ provider_ = nullptr;
}
void VideoFrameProviderClientImpl::DidReceiveFrame() {

Powered by Google App Engine
This is Rietveld 408576698