Index: components/scheduler/child/task_queue_impl.cc |
diff --git a/components/scheduler/child/task_queue_impl.cc b/components/scheduler/child/task_queue_impl.cc |
index 556332b2f9b98cadddff2e0b94e3fe0b31d1466a..760e262d89a9285c6bd4f5088a4dbae03084ba81 100644 |
--- a/components/scheduler/child/task_queue_impl.cc |
+++ b/components/scheduler/child/task_queue_impl.cc |
@@ -336,6 +336,16 @@ const char* TaskQueueImpl::GetName() const { |
return name_; |
} |
+void TaskQueueImpl::SetOrigin(const std::string& origin) { |
+ DCHECK(main_thread_checker_.CalledOnValidThread()); |
+ origin_ = origin; |
+} |
+ |
+const std::string& TaskQueueImpl::GetOrigin() { |
+ DCHECK(main_thread_checker_.CalledOnValidThread()); |
+ return origin_; |
+} |
+ |
bool TaskQueueImpl::GetWorkQueueFrontTaskEnqueueOrder( |
int* enqueue_order) const { |
if (work_queue_.empty()) |
@@ -413,6 +423,7 @@ void TaskQueueImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
base::AutoLock lock(lock_); |
state->BeginDictionary(); |
state->SetString("name", GetName()); |
+ state->SetString("origin", origin_); |
state->SetString("pump_policy", PumpPolicyToString(pump_policy_)); |
state->SetString("wakeup_policy", WakeupPolicyToString(wakeup_policy_)); |
bool verbose_tracing_enabled = false; |