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

Unified Diff: cc/test/ordered_simple_task_runner.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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
Index: cc/test/ordered_simple_task_runner.cc
diff --git a/cc/test/ordered_simple_task_runner.cc b/cc/test/ordered_simple_task_runner.cc
index dea8556d52790a90b4f4f7b10548097898e6ed9b..cc211cab62a0981b3c84425917a38f9daed97f7f 100644
--- a/cc/test/ordered_simple_task_runner.cc
+++ b/cc/test/ordered_simple_task_runner.cc
@@ -64,12 +64,12 @@ bool TestOrderablePendingTask::operator<(
return ShouldRunBefore(other);
}
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
TestOrderablePendingTask::AsValue() const {
- scoped_refptr<base::trace_event::TracedValue> state =
- new base::trace_event::TracedValue();
+ scoped_ptr<base::trace_event::TracedValue> state(
+ new base::trace_event::TracedValue());
AsValueInto(state.get());
- return state;
+ return std::move(state);
}
void TestOrderablePendingTask::AsValueInto(
@@ -261,12 +261,12 @@ bool OrderedSimpleTaskRunner::RunForPeriod(base::TimeDelta period) {
}
// base::trace_event tracing functionality
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
OrderedSimpleTaskRunner::AsValue() const {
- scoped_refptr<base::trace_event::TracedValue> state =
- new base::trace_event::TracedValue();
+ scoped_ptr<base::trace_event::TracedValue> state(
+ new base::trace_event::TracedValue());
AsValueInto(state.get());
- return state;
+ return std::move(state);
}
void OrderedSimpleTaskRunner::AsValueInto(

Powered by Google App Engine
This is Rietveld 408576698