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

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

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win Fix -> Missing header Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/watchdog_unittest.cc ('k') | base/threading/worker_pool_posix_unittest.cc » ('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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 base::LazyInstance<WorkerPoolImpl> g_lazy_worker_pool = 55 base::LazyInstance<WorkerPoolImpl> g_lazy_worker_pool =
56 LAZY_INSTANCE_INITIALIZER; 56 LAZY_INSTANCE_INITIALIZER;
57 57
58 class WorkerThread : public PlatformThread::Delegate { 58 class WorkerThread : public PlatformThread::Delegate {
59 public: 59 public:
60 WorkerThread(const std::string& name_prefix, 60 WorkerThread(const std::string& name_prefix,
61 base::PosixDynamicThreadPool* pool) 61 base::PosixDynamicThreadPool* pool)
62 : name_prefix_(name_prefix), 62 : name_prefix_(name_prefix),
63 pool_(pool) {} 63 pool_(pool) {}
64 64
65 virtual void ThreadMain(); 65 virtual void ThreadMain() OVERRIDE;
66 66
67 private: 67 private:
68 const std::string name_prefix_; 68 const std::string name_prefix_;
69 scoped_refptr<base::PosixDynamicThreadPool> pool_; 69 scoped_refptr<base::PosixDynamicThreadPool> pool_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(WorkerThread); 71 DISALLOW_COPY_AND_ASSIGN(WorkerThread);
72 }; 72 };
73 73
74 void WorkerThread::ThreadMain() { 74 void WorkerThread::ThreadMain() {
75 const std::string name = base::StringPrintf( 75 const std::string name = base::StringPrintf(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return PendingTask(FROM_HERE, base::Closure()); 179 return PendingTask(FROM_HERE, base::Closure());
180 } 180 }
181 } 181 }
182 182
183 PendingTask pending_task = pending_tasks_.front(); 183 PendingTask pending_task = pending_tasks_.front();
184 pending_tasks_.pop(); 184 pending_tasks_.pop();
185 return pending_task; 185 return pending_task;
186 } 186 }
187 187
188 } // namespace base 188 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/watchdog_unittest.cc ('k') | base/threading/worker_pool_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698