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

Side by Side Diff: base/threading/sequenced_worker_pool.h

Issue 10496002: Revert 140102 - Remove old PostDelayedTask interfaces that use int ms instead of TimeDelta. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/platform_thread_win.cc ('k') | base/threading/sequenced_worker_pool.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 #ifndef BASE_THREADING_SEQUENCED_WORKER_POOL_H_ 5 #ifndef BASE_THREADING_SEQUENCED_WORKER_POOL_H_
6 #define BASE_THREADING_SEQUENCED_WORKER_POOL_H_ 6 #define BASE_THREADING_SEQUENCED_WORKER_POOL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <string> 10 #include <string>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // behavior. 224 // behavior.
225 bool PostSequencedWorkerTaskWithShutdownBehavior( 225 bool PostSequencedWorkerTaskWithShutdownBehavior(
226 SequenceToken sequence_token, 226 SequenceToken sequence_token,
227 const tracked_objects::Location& from_here, 227 const tracked_objects::Location& from_here,
228 const Closure& task, 228 const Closure& task,
229 WorkerShutdown shutdown_behavior); 229 WorkerShutdown shutdown_behavior);
230 230
231 // TaskRunner implementation. Forwards to PostWorkerTask(). 231 // TaskRunner implementation. Forwards to PostWorkerTask().
232 virtual bool PostDelayedTask(const tracked_objects::Location& from_here, 232 virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
233 const Closure& task, 233 const Closure& task,
234 int64 delay_ms) OVERRIDE;
235 virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
236 const Closure& task,
234 TimeDelta delay) OVERRIDE; 237 TimeDelta delay) OVERRIDE;
235 virtual bool RunsTasksOnCurrentThread() const OVERRIDE; 238 virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
236 239
237 // Returns true if the current thread is processing a task with the given 240 // Returns true if the current thread is processing a task with the given
238 // sequence_token. 241 // sequence_token.
239 bool IsRunningSequenceOnCurrentThread(SequenceToken sequence_token) const; 242 bool IsRunningSequenceOnCurrentThread(SequenceToken sequence_token) const;
240 243
241 // Blocks until all pending tasks are complete. This should only be called in 244 // Blocks until all pending tasks are complete. This should only be called in
242 // unit tests when you want to validate something that should have happened. 245 // unit tests when you want to validate something that should have happened.
243 // 246 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Avoid pulling in too many headers by putting (almost) everything 278 // Avoid pulling in too many headers by putting (almost) everything
276 // into |inner_|. 279 // into |inner_|.
277 const scoped_ptr<Inner> inner_; 280 const scoped_ptr<Inner> inner_;
278 281
279 DISALLOW_COPY_AND_ASSIGN(SequencedWorkerPool); 282 DISALLOW_COPY_AND_ASSIGN(SequencedWorkerPool);
280 }; 283 };
281 284
282 } // namespace base 285 } // namespace base
283 286
284 #endif // BASE_THREADING_SEQUENCED_WORKER_POOL_H_ 287 #endif // BASE_THREADING_SEQUENCED_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | base/threading/sequenced_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698