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

Unified Diff: cc/trees/layer_tree_host_unittest_delegated.cc

Issue 640203002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr [part-… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/trees/layer_tree_host_unittest_delegated.cc
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index 095513be80c13ea72a21df15bcf9bf4f384f24c9..1170c8a5198fed0b894d4303d306c8abe153ee71 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -275,8 +275,8 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer
if (delegated_.get()) {
delegated_->RemoveFromParent();
- delegated_ = NULL;
- frame_provider_ = NULL;
+ delegated_ = nullptr;
+ frame_provider_ = nullptr;
}
frame_provider_ = new DelegatedFrameProvider(resource_collection_.get(),
@@ -296,7 +296,7 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer
return delegated;
}
- virtual void AfterTest() override { resource_collection_->SetClient(NULL); }
+ virtual void AfterTest() override { resource_collection_->SetClient(nullptr); }
danakj 2014/10/09 16:00:53 and here
// DelegatedFrameProviderClient implementation.
virtual void UnusedResourcesAreAvailable() override { available_ = true; }
@@ -1897,7 +1897,7 @@ class LayerTreeHostDelegatedTestTwoImplLayersTwoFrames
// Remove the delegated layer and replace it with a new one. Make a new
// frame but with the same resources for it.
delegated_->RemoveFromParent();
- delegated_ = NULL;
+ delegated_ = nullptr;
frame_provider_->SetFrameData(frame.Pass());
delegated_ = CreateDelegatedLayer(frame_provider_.get());
@@ -1962,7 +1962,7 @@ class LayerTreeHostDelegatedTestTwoLayers
// And drop our ref on the frame provider so only the layers keep it
// alive.
- frame_provider_ = NULL;
+ frame_provider_ = nullptr;
break;
case 3:
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
@@ -1982,7 +1982,7 @@ class LayerTreeHostDelegatedTestTwoLayers
// No resources should be returned yet.
root_->AddChild(delegated_);
delegated_thief_->RemoveFromParent();
- delegated_thief_ = NULL;
+ delegated_thief_ = nullptr;
break;
case 5:
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
@@ -1999,7 +1999,7 @@ class LayerTreeHostDelegatedTestTwoLayers
EXPECT_FALSE(TestAndResetAvailable());
// Destroy the layer and the resources should be returned immediately.
- delegated_ = NULL;
+ delegated_ = nullptr;
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
{
@@ -2083,7 +2083,7 @@ class LayerTreeHostDelegatedTestRemoveAndAddToTree
// Destroy the layer.
delegated_->RemoveFromParent();
- delegated_ = NULL;
+ delegated_ = nullptr;
break;
case 6:
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
@@ -2091,7 +2091,7 @@ class LayerTreeHostDelegatedTestRemoveAndAddToTree
EXPECT_FALSE(TestAndResetAvailable());
// Destroy the frame provider. Resources should be returned.
- frame_provider_ = NULL;
+ frame_provider_ = nullptr;
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
{
@@ -2166,14 +2166,14 @@ class LayerTreeHostDelegatedTestRemoveAndChangeResources
}
// Destroy the frame provider.
- frame_provider_ = NULL;
+ frame_provider_ = nullptr;
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
EXPECT_EQ(0u, resources.size());
EXPECT_FALSE(TestAndResetAvailable());
// Destroy the layer. Resources should be returned.
- delegated_ = NULL;
+ delegated_ = nullptr;
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources);
{

Powered by Google App Engine
This is Rietveld 408576698