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

Unified Diff: ui/compositor/callback_layer_animation_observer_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/chromeos/touch_exploration_controller_unittest.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/callback_layer_animation_observer_unittest.cc
diff --git a/ui/compositor/callback_layer_animation_observer_unittest.cc b/ui/compositor/callback_layer_animation_observer_unittest.cc
index bb14a0b68669fc41465b0a7a96bf095332f61b82..6ea60b7fd379aad5a31d19f7dd16986598e289e6 100644
--- a/ui/compositor/callback_layer_animation_observer_unittest.cc
+++ b/ui/compositor/callback_layer_animation_observer_unittest.cc
@@ -4,10 +4,11 @@
#include "ui/compositor/callback_layer_animation_observer.h"
+#include <memory>
+
#include "base/bind.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/test/layer_animation_observer_test_api.h"
@@ -219,15 +220,15 @@ class CallbackLayerAnimationObserverTest : public testing::Test {
// managed by this.
LayerAnimationSequence* CreateLayerAnimationSequence();
- scoped_ptr<TestCallbacks> callbacks_;
+ std::unique_ptr<TestCallbacks> callbacks_;
- scoped_ptr<CallbackLayerAnimationObserver> observer_;
+ std::unique_ptr<CallbackLayerAnimationObserver> observer_;
- scoped_ptr<LayerAnimationObserverTestApi> observer_test_api_;
+ std::unique_ptr<LayerAnimationObserverTestApi> observer_test_api_;
// List of managaged sequences created by CreateLayerAnimationSequence() that
// need to be destroyed.
- ScopedVector<LayerAnimationSequence> sequences_;
+ std::vector<std::unique_ptr<LayerAnimationSequence>> sequences_;
private:
DISALLOW_COPY_AND_ASSIGN(CallbackLayerAnimationObserverTest);
@@ -252,9 +253,8 @@ CallbackLayerAnimationObserverTest::~CallbackLayerAnimationObserverTest() {
LayerAnimationSequence*
CallbackLayerAnimationObserverTest::CreateLayerAnimationSequence() {
- LayerAnimationSequence* sequence = new LayerAnimationSequence();
- sequences_.push_back(sequence);
- return sequence;
+ sequences_.emplace_back(new LayerAnimationSequence);
+ return sequences_.back().get();
}
TEST(CallbackLayerAnimationObserverDestructionTest, VerifyFalseAutoDelete) {
« no previous file with comments | « ui/chromeos/touch_exploration_controller_unittest.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698