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

Side by Side Diff: components/scheduler/base/task_queue_impl.cc

Issue 1942053002: Deletes base::MessageLoop::set_thread_name(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed media_unittests Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/scheduler/base/task_queue_impl.h" 5 #include "components/scheduler/base/task_queue_impl.h"
6 6
7 #include "base/threading/thread_id_name_manager.h"
7 #include "base/trace_event/blame_context.h" 8 #include "base/trace_event/blame_context.h"
8 #include "components/scheduler/base/task_queue_manager.h" 9 #include "components/scheduler/base/task_queue_manager.h"
9 #include "components/scheduler/base/task_queue_manager_delegate.h" 10 #include "components/scheduler/base/task_queue_manager_delegate.h"
10 #include "components/scheduler/base/time_domain.h" 11 #include "components/scheduler/base/time_domain.h"
11 #include "components/scheduler/base/work_queue.h" 12 #include "components/scheduler/base/work_queue.h"
12 13
13 namespace scheduler { 14 namespace scheduler {
14 namespace internal { 15 namespace internal {
15 16
16 TaskQueueImpl::TaskQueueImpl( 17 TaskQueueImpl::TaskQueueImpl(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool TaskQueueImpl::PostNonNestableDelayedTask( 151 bool TaskQueueImpl::PostNonNestableDelayedTask(
151 const tracked_objects::Location& from_here, 152 const tracked_objects::Location& from_here,
152 const base::Closure& task, 153 const base::Closure& task,
153 base::TimeDelta delay) { 154 base::TimeDelta delay) {
154 if (delay.is_zero()) 155 if (delay.is_zero())
155 return PostImmediateTaskImpl(from_here, task, TaskType::NON_NESTABLE); 156 return PostImmediateTaskImpl(from_here, task, TaskType::NON_NESTABLE);
156 157
157 return PostDelayedTaskImpl(from_here, task, delay, TaskType::NON_NESTABLE); 158 return PostDelayedTaskImpl(from_here, task, delay, TaskType::NON_NESTABLE);
158 } 159 }
159 160
161 std::string TaskQueueImpl::GetThreadName() const {
162 base::AutoLock lock(any_thread_lock_);
163 return base::ThreadIdNameManager::GetInstance()->GetName(thread_id_);
164 }
165
160 bool TaskQueueImpl::PostImmediateTaskImpl( 166 bool TaskQueueImpl::PostImmediateTaskImpl(
161 const tracked_objects::Location& from_here, 167 const tracked_objects::Location& from_here,
162 const base::Closure& task, 168 const base::Closure& task,
163 TaskType task_type) { 169 TaskType task_type) {
164 base::AutoLock lock(any_thread_lock_); 170 base::AutoLock lock(any_thread_lock_);
165 if (!any_thread().task_queue_manager) 171 if (!any_thread().task_queue_manager)
166 return false; 172 return false;
167 173
168 EnqueueOrder sequence_number = 174 EnqueueOrder sequence_number =
169 any_thread().task_queue_manager->GetNextSequenceNumber(); 175 any_thread().task_queue_manager->GetNextSequenceNumber();
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 state->SetBoolean("nestable", task.nestable); 705 state->SetBoolean("nestable", task.nestable);
700 state->SetBoolean("is_high_res", task.is_high_res); 706 state->SetBoolean("is_high_res", task.is_high_res);
701 state->SetDouble( 707 state->SetDouble(
702 "delayed_run_time", 708 "delayed_run_time",
703 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L); 709 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L);
704 state->EndDictionary(); 710 state->EndDictionary();
705 } 711 }
706 712
707 } // namespace internal 713 } // namespace internal
708 } // namespace scheduler 714 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698