Introduce SingleThreadTaskExecutor the replacement for base::MessageLoop

A large but mostly trivial patch in preparation for removing
base::MessageLoop. We introduce SingleThreadTaskExecutor a simple FIFO
scheduler, which is intended for non-test code that needs a simple
single threaded task environment. Tests should use ScopedTaskEnvironment
or TestBrowserThreadBundle instead.

This patch also moves MessageLoop::Type to MessagePump::Type and
moves the factory method to MessagePump::Create.

Change-Id: I9850c4657bb90b62490f4313c420cae025101371
BUG: 891670
Reviewed-by: Alex Clarke <>
Reviewed-by: Gabriel Charette <>
Commit-Queue: Alex Clarke <>
Cr-Original-Commit-Position: refs/heads/master@{#664709}
Cr-Mirrored-Commit: 636e705be41ed9e7f50cdb13ceb5a9af5e3f4e5c
2 files changed