Chromium Code Reviews
DescriptionUse TaskScheduler in directory_lister.cc.
Instead of taking an external TaskRunner, post directly to
TaskScheduler. This changes removes a call to the deprecated
WorkerPool::GetTaskRunner method.
The following traits are used to post to TaskScheduler:
Priority: Inherited (default)
The priority is inherited from the calling context (i.e. TaskTraits
are initialized with the priority of the current task).
Shutdown behavior: CONTINUE_ON_SHUTDOWN
Tasks posted with this mode which have not started executing before
shutdown is initiated will never run. Tasks with this mode running at
shutdown will be ignored (the worker will not be joined).
Note: Tasks that were previously posted to base::WorkerPool should
use this shutdown behavior because this is how base::WorkerPool
handles all its tasks.
May Block:
Tasks posted with MayBlock() may block. This includes but is not
limited to tasks that wait on synchronous file I/O operations:
read or write a file from disk, interact with a pipe or a socket,
rename or delete a file, enumerate files in a directory, etc. This
trait isn't required for the mere use of locks.
BUG=659191
Review-Url: https://codereview.chromium.org/2682523002
Cr-Commit-Position: refs/heads/master@{#449599}
Committed: https://chromium.googlesource.com/chromium/src/+/9f0b47853110ba3becfea5ca2e447588cff39fe5
Patch Set 1 #Patch Set 2 : self-review #Patch Set 3 : add ScopedTaskScheduler #Patch Set 4 : fix build error #Patch Set 5 : remove ScopedTaskScheduler from TokenBindingURLRequestTest #
Dependent Patchsets: Messages
Total messages: 29 (23 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||