Index: ash/wm/session_state_animator_impl.cc |
diff --git a/ash/wm/session_state_animator_impl.cc b/ash/wm/session_state_animator_impl.cc |
index 783a2ba8c2f168c8a3b9879268042483943b2477..f75cf0eb6d05c836b8c89945bfefba2d9166bd88 100644 |
--- a/ash/wm/session_state_animator_impl.cc |
+++ b/ash/wm/session_state_animator_impl.cc |
@@ -254,20 +254,18 @@ void StartGrayscaleBrightnessAnimationForWindow( |
ui::LayerAnimationObserver* observer) { |
ui::LayerAnimator* animator = window->layer()->GetAnimator(); |
- std::unique_ptr<ui::LayerAnimationSequence> brightness_sequence( |
- new ui::LayerAnimationSequence()); |
- std::unique_ptr<ui::LayerAnimationSequence> grayscale_sequence( |
- new ui::LayerAnimationSequence()); |
+ auto brightness_sequence = base::MakeUnique<ui::LayerAnimationSequence>(); |
+ auto grayscale_sequence = base::MakeUnique<ui::LayerAnimationSequence>(); |
- std::unique_ptr<ui::LayerAnimationElement> brightness_element( |
- ui::LayerAnimationElement::CreateBrightnessElement(target, duration)); |
+ std::unique_ptr<ui::LayerAnimationElement> brightness_element = |
+ ui::LayerAnimationElement::CreateBrightnessElement(target, duration); |
brightness_element->set_tween_type(tween_type); |
- brightness_sequence->AddElement(brightness_element.release()); |
+ brightness_sequence->AddElement(std::move(brightness_element)); |
- std::unique_ptr<ui::LayerAnimationElement> grayscale_element( |
- ui::LayerAnimationElement::CreateGrayscaleElement(target, duration)); |
+ std::unique_ptr<ui::LayerAnimationElement> grayscale_element = |
+ ui::LayerAnimationElement::CreateGrayscaleElement(target, duration); |
grayscale_element->set_tween_type(tween_type); |
- grayscale_sequence->AddElement(grayscale_element.release()); |
+ grayscale_sequence->AddElement(std::move(grayscale_element)); |
std::vector<ui::LayerAnimationSequence*> animations; |
animations.push_back(brightness_sequence.release()); |