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

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

Issue 1652083002: Prepare for per-webview virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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 | « components/scheduler/base/task_queue_impl.h ('k') | components/scheduler/base/task_queue_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue_impl.cc
diff --git a/components/scheduler/base/task_queue_impl.cc b/components/scheduler/base/task_queue_impl.cc
index 5508c9b40d24dbefd416b3c62d06ea46b480a726..e013804dad0397931d96b1e9dd25b4992d9efebc 100644
--- a/components/scheduler/base/task_queue_impl.cc
+++ b/components/scheduler/base/task_queue_impl.cc
@@ -617,6 +617,14 @@ void TaskQueueImpl::SetTimeDomain(TimeDomain* time_domain) {
any_thread().time_domain = time_domain;
}
+TimeDomain* TaskQueueImpl::GetTimeDomain() const {
+ if (base::PlatformThread::CurrentId() == thread_id_)
+ return main_thread_only().time_domain;
+
+ base::AutoLock lock(any_thread_lock_);
+ return any_thread().time_domain;
+}
+
// static
void TaskQueueImpl::QueueAsValueInto(const std::queue<Task>& queue,
base::trace_event::TracedValue* state) {
« no previous file with comments | « components/scheduler/base/task_queue_impl.h ('k') | components/scheduler/base/task_queue_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698