Chromium Code Reviews
DescriptionRemove MessageLoop::current() from history_service.cc
Whenever possible, use Thread/SequencedTaskRunnerHandle::Get() instead
of MessageLoop::current(). Thread/SequencedTaskRunnerHandle::Get() work
within TaskScheduler while MessageLoop::current() doesn't.
Good reasons to use MessageLoop::current():
- Add destruction, nesting or task observers.
- Run nested loops.
Bad reasons to use MessageLoop::current():
- Post tasks. Use Thread/SequencedTaskRunnerHandle::Get() instead.
- Watch a file descriptor. Use FileDescriptorWatcher instead.
- Verify that it is possible to post tasks to the current thread.
Use Thread/SequencedTaskRunnerHandle::IsSet() instead.
- Verify that code runs on a specific thread. Use
SingleThreadTaskRunner::BelongsToCurrentThread() instead.
BUG=650723
Committed: https://crrev.com/571fada22bd532cb22a98ff61092026826deb98b
Cr-Commit-Position: refs/heads/master@{#425121}
Patch Set 1 #Patch Set 2 : fix build error #
Total comments: 2
Patch Set 3 : CR sdefresne #11 #
Messages
Total messages: 18 (12 generated)
|
|||||||||||||||||||||||||||||||||||||