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

Unified Diff: components/scheduler/child/task_queue_impl.cc

Issue 1314903007: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Responding to feedback Created 5 years, 3 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/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;

Powered by Google App Engine
This is Rietveld 408576698