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

Unified Diff: components/scheduler/base/task_queue_manager.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: components/scheduler/base/task_queue_manager.cc
diff --git a/components/scheduler/base/task_queue_manager.cc b/components/scheduler/base/task_queue_manager.cc
index 009d4ff6a206150a799946be7c9da6aee510884b..4978c2315bfb0aeb474a7d0c76f8d8eff667a0d6 100644
--- a/components/scheduler/base/task_queue_manager.cc
+++ b/components/scheduler/base/task_queue_manager.cc
@@ -366,13 +366,13 @@ LazyNow TaskQueueManager::CreateLazyNow() const {
return LazyNow(delegate_.get());
}
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
TaskQueueManager::AsValueWithSelectorResult(
bool should_run,
internal::WorkQueue* selected_work_queue) const {
DCHECK(main_thread_checker_.CalledOnValidThread());
- scoped_refptr<base::trace_event::TracedValue> state =
- new base::trace_event::TracedValue();
+ scoped_ptr<base::trace_event::TracedValue> state(
+ new base::trace_event::TracedValue());
state->BeginArray("queues");
for (auto& queue : queues_)
queue->AsValueInto(state.get());
@@ -390,7 +390,7 @@ TaskQueueManager::AsValueWithSelectorResult(
for (auto& time_domain : time_domains_)
time_domain->AsValueInto(state.get());
state->EndArray();
- return state;
+ return std::move(state);
}
void TaskQueueManager::OnTaskQueueEnabled(internal::TaskQueueImpl* queue) {

Powered by Google App Engine
This is Rietveld 408576698