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

Side by Side Diff: base/threading/worker_pool_posix.cc

Issue 2956683002: chrome://profiler infrastructure uses base time types. (Closed)
Patch Set: Address nit. Created 3 years, 5 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
« no previous file with comments | « base/profiler/tracked_time_unittest.cc ('k') | base/tracked_objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/threading/worker_pool_posix.h" 5 #include "base/threading/worker_pool_posix.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "base/threading/thread_local.h" 19 #include "base/threading/thread_local.h"
20 #include "base/threading/worker_pool.h" 20 #include "base/threading/worker_pool.h"
21 #include "base/trace_event/trace_event.h" 21 #include "base/trace_event/trace_event.h"
22 #include "base/tracked_objects.h" 22 #include "base/tracked_objects.h"
23 23
24 using tracked_objects::TrackedTime;
25
26 namespace base { 24 namespace base {
27 25
28 namespace { 26 namespace {
29 27
30 base::LazyInstance<ThreadLocalBoolean>::Leaky 28 base::LazyInstance<ThreadLocalBoolean>::Leaky
31 g_worker_pool_running_on_this_thread = LAZY_INSTANCE_INITIALIZER; 29 g_worker_pool_running_on_this_thread = LAZY_INSTANCE_INITIALIZER;
32 30
33 const int kIdleSecondsBeforeExit = 10 * 60; 31 const int kIdleSecondsBeforeExit = 10 * 60;
34 32
35 #if defined(OS_MACOSX) 33 #if defined(OS_MACOSX)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return PendingTask(FROM_HERE, base::Closure()); 183 return PendingTask(FROM_HERE, base::Closure());
186 } 184 }
187 } 185 }
188 186
189 PendingTask pending_task = std::move(pending_tasks_.front()); 187 PendingTask pending_task = std::move(pending_tasks_.front());
190 pending_tasks_.pop(); 188 pending_tasks_.pop();
191 return pending_task; 189 return pending_task;
192 } 190 }
193 191
194 } // namespace base 192 } // namespace base
OLDNEW
« no previous file with comments | « base/profiler/tracked_time_unittest.cc ('k') | base/tracked_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698