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

Unified Diff: cc/animation/animation.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/animation/animation.h ('k') | cc/animation/animation_curve.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation.cc
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index 5d3462773ad59263072a53278de9f09d909f42cd..353bef7623c7243f55ea1530339422922af01caf 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -6,6 +6,7 @@
#include <cmath>
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
#include "cc/animation/animation_curve.h"
@@ -32,15 +33,16 @@ static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 ==
namespace cc {
-scoped_ptr<Animation> Animation::Create(scoped_ptr<AnimationCurve> curve,
- int animation_id,
- int group_id,
- TargetProperty::Type target_property) {
- return make_scoped_ptr(
+std::unique_ptr<Animation> Animation::Create(
+ std::unique_ptr<AnimationCurve> curve,
+ int animation_id,
+ int group_id,
+ TargetProperty::Type target_property) {
+ return base::WrapUnique(
new Animation(std::move(curve), animation_id, group_id, target_property));
}
-Animation::Animation(scoped_ptr<AnimationCurve> curve,
+Animation::Animation(std::unique_ptr<AnimationCurve> curve,
int animation_id,
int group_id,
TargetProperty::Type target_property)
@@ -238,9 +240,9 @@ base::TimeDelta Animation::TrimTimeToCurrentIteration(
return iteration_time;
}
-scoped_ptr<Animation> Animation::CloneAndInitialize(
+std::unique_ptr<Animation> Animation::CloneAndInitialize(
RunState initial_run_state) const {
- scoped_ptr<Animation> to_return(
+ std::unique_ptr<Animation> to_return(
new Animation(curve_->Clone(), id_, group_, target_property_));
to_return->run_state_ = initial_run_state;
to_return->iterations_ = iterations_;
« no previous file with comments | « cc/animation/animation.h ('k') | cc/animation/animation_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698