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

Unified Diff: cc/test/scheduler_test_common.h

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/test/render_pass_test_utils.cc ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/scheduler_test_common.h
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index 788b6835248a670b8be23da25f392aa324882038..dffd71bbda441a5df6e9426f2145ab0b2e9460d5 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -7,10 +7,11 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/time/time.h"
#include "cc/scheduler/compositor_timing_history.h"
#include "cc/scheduler/scheduler.h"
@@ -39,10 +40,11 @@ class FakeDelayBasedTimeSourceClient : public DelayBasedTimeSourceClient {
class FakeDelayBasedTimeSource : public DelayBasedTimeSource {
public:
- static scoped_ptr<FakeDelayBasedTimeSource> Create(
+ static std::unique_ptr<FakeDelayBasedTimeSource> Create(
base::TimeDelta interval,
base::SingleThreadTaskRunner* task_runner) {
- return make_scoped_ptr(new FakeDelayBasedTimeSource(interval, task_runner));
+ return base::WrapUnique(
+ new FakeDelayBasedTimeSource(interval, task_runner));
}
~FakeDelayBasedTimeSource() override {}
@@ -63,11 +65,11 @@ class FakeDelayBasedTimeSource : public DelayBasedTimeSource {
class TestDelayBasedTimeSource : public DelayBasedTimeSource {
public:
- static scoped_ptr<TestDelayBasedTimeSource> Create(
+ static std::unique_ptr<TestDelayBasedTimeSource> Create(
base::SimpleTestTickClock* now_src,
base::TimeDelta interval,
OrderedSimpleTaskRunner* task_runner) {
- return make_scoped_ptr(
+ return base::WrapUnique(
new TestDelayBasedTimeSource(now_src, interval, task_runner));
}
@@ -144,7 +146,7 @@ class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource {
class FakeCompositorTimingHistory : public CompositorTimingHistory {
public:
- static scoped_ptr<FakeCompositorTimingHistory> Create(
+ static std::unique_ptr<FakeCompositorTimingHistory> Create(
bool using_synchronous_renderer_compositor);
~FakeCompositorTimingHistory() override;
@@ -172,10 +174,10 @@ class FakeCompositorTimingHistory : public CompositorTimingHistory {
protected:
FakeCompositorTimingHistory(bool using_synchronous_renderer_compositor,
- scoped_ptr<RenderingStatsInstrumentation>
+ std::unique_ptr<RenderingStatsInstrumentation>
rendering_stats_instrumentation_owned);
- scoped_ptr<RenderingStatsInstrumentation>
+ std::unique_ptr<RenderingStatsInstrumentation>
rendering_stats_instrumentation_owned_;
base::TimeDelta begin_main_frame_to_commit_duration_;
@@ -193,13 +195,14 @@ class FakeCompositorTimingHistory : public CompositorTimingHistory {
class TestScheduler : public Scheduler {
public:
- TestScheduler(base::SimpleTestTickClock* now_src,
- SchedulerClient* client,
- const SchedulerSettings& scheduler_settings,
- int layer_tree_host_id,
- OrderedSimpleTaskRunner* task_runner,
- BeginFrameSource* begin_frame_source,
- scoped_ptr<CompositorTimingHistory> compositor_timing_history);
+ TestScheduler(
+ base::SimpleTestTickClock* now_src,
+ SchedulerClient* client,
+ const SchedulerSettings& scheduler_settings,
+ int layer_tree_host_id,
+ OrderedSimpleTaskRunner* task_runner,
+ BeginFrameSource* begin_frame_source,
+ std::unique_ptr<CompositorTimingHistory> compositor_timing_history);
// Extra test helper functionality
bool IsBeginRetroFrameArgsEmpty() const {
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698