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

Unified Diff: cc/scheduler/scheduler.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/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 3fb8b3b13de76c935daf8d28d9b8cdd529ac2cb9..e2a531fc04975334761aafa63bde2401c1748a40 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -8,6 +8,7 @@
#include "base/auto_reset.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
@@ -26,16 +27,16 @@ const base::TimeDelta kDeadlineFudgeFactor =
base::TimeDelta::FromMicroseconds(1000);
}
-scoped_ptr<Scheduler> Scheduler::Create(
+std::unique_ptr<Scheduler> Scheduler::Create(
SchedulerClient* client,
const SchedulerSettings& settings,
int layer_tree_host_id,
base::SingleThreadTaskRunner* task_runner,
BeginFrameSource* begin_frame_source,
- scoped_ptr<CompositorTimingHistory> compositor_timing_history) {
- return make_scoped_ptr(new Scheduler(client, settings, layer_tree_host_id,
- task_runner, begin_frame_source,
- std::move(compositor_timing_history)));
+ std::unique_ptr<CompositorTimingHistory> compositor_timing_history) {
+ return base::WrapUnique(new Scheduler(client, settings, layer_tree_host_id,
+ task_runner, begin_frame_source,
+ std::move(compositor_timing_history)));
}
Scheduler::Scheduler(
@@ -44,7 +45,7 @@ Scheduler::Scheduler(
int layer_tree_host_id,
base::SingleThreadTaskRunner* task_runner,
BeginFrameSource* begin_frame_source,
- scoped_ptr<CompositorTimingHistory> compositor_timing_history)
+ std::unique_ptr<CompositorTimingHistory> compositor_timing_history)
: settings_(settings),
client_(client),
layer_tree_host_id_(layer_tree_host_id),
@@ -741,9 +742,9 @@ void Scheduler::ProcessScheduledActions() {
SetupNextBeginFrameIfNeeded();
}
-scoped_ptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue()
- const {
- scoped_ptr<base::trace_event::TracedValue> state(
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+Scheduler::AsValue() const {
+ std::unique_ptr<base::trace_event::TracedValue> state(
new base::trace_event::TracedValue());
AsValueInto(state.get());
return std::move(state);
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698