| Index: chrome/browser/process_singleton_linux.cc
|
| diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
|
| index cbf6492fa22cd9caec07f2be5101d81734ab2d48..34feef1901f0b0eff0edd7ed1d4b2c606564e96b 100644
|
| --- a/chrome/browser/process_singleton_linux.cc
|
| +++ b/chrome/browser/process_singleton_linux.cc
|
| @@ -995,15 +995,13 @@ bool ProcessSingleton::Create() {
|
| if (listen(sock, 5) < 0)
|
| NOTREACHED() << "listen failed: " << safe_strerror(errno);
|
|
|
| - // Normally we would use BrowserThread, but the IO thread hasn't started yet.
|
| - // Using g_browser_process, we start the thread so we can listen on the
|
| - // socket.
|
| - MessageLoop* ml = g_browser_process->io_thread()->message_loop();
|
| - DCHECK(ml);
|
| - ml->PostTask(FROM_HERE, base::Bind(
|
| - &ProcessSingleton::LinuxWatcher::StartListening,
|
| - watcher_.get(),
|
| - sock));
|
| + DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::IO));
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO,
|
| + FROM_HERE,
|
| + base::Bind(&ProcessSingleton::LinuxWatcher::StartListening,
|
| + watcher_.get(),
|
| + sock));
|
|
|
| return true;
|
| }
|
|
|