chore: convert more module and helper files from bind (#18069)

This commit is contained in:
Shelley Vohr 2019-05-02 08:32:33 -07:00 committed by GitHub
parent 2dd108e9c9
commit 55a7f92297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 42 additions and 40 deletions

View file

@ -136,10 +136,10 @@ void ShutdownDetector::ThreadMain() {
bytes_read += ret;
} while (bytes_read < sizeof(signal));
VLOG(1) << "Handling shutdown for signal " << signal << ".";
base::Closure task =
base::Bind(&Browser::Quit, base::Unretained(Browser::Get()));
if (!base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI}, task)) {
if (!base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::UI},
base::BindOnce(&Browser::Quit, base::Unretained(Browser::Get())))) {
// Without a UI thread to post the exit task to, there aren't many
// options. Raise the signal again. The default handler will pick it up
// and cause an ungraceful exit.