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

Unified Diff: ui/app_list/views/pulsing_block_view.cc

Issue 2550933002: Make all LayerAnimationElement::Create*Element return unique_ptr (Closed)
Patch Set: Complete inclusion Created 4 years 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: ui/app_list/views/pulsing_block_view.cc
diff --git a/ui/app_list/views/pulsing_block_view.cc b/ui/app_list/views/pulsing_block_view.cc
index 9d515329305460a6969a2e86fa6c4698c7c27169..3eef4882b442bbc4fb363f02be9aff59bd702093 100644
--- a/ui/app_list/views/pulsing_block_view.cc
+++ b/ui/app_list/views/pulsing_block_view.cc
@@ -6,9 +6,11 @@
#include <stddef.h>
+#include <memory>
#include <vector>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer.h"
@@ -31,10 +33,10 @@ void SchedulePulsingAnimation(ui::Layer* layer) {
DCHECK(layer);
DCHECK_EQ(arraysize(kAnimationOpacity), arraysize(kAnimationScale));
- std::unique_ptr<ui::LayerAnimationSequence> opacity_sequence(
- new ui::LayerAnimationSequence());
- std::unique_ptr<ui::LayerAnimationSequence> transform_sequence(
- new ui::LayerAnimationSequence());
+ std::unique_ptr<ui::LayerAnimationSequence> opacity_sequence =
+ base::MakeUnique<ui::LayerAnimationSequence>();
+ std::unique_ptr<ui::LayerAnimationSequence> transform_sequence =
+ base::MakeUnique<ui::LayerAnimationSequence>();
// The animations loop infinitely.
opacity_sequence->set_is_cyclic(true);

Powered by Google App Engine
This is Rietveld 408576698