Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2285)

Unified Diff: chrome/browser/process_singleton_linux.cc

Issue 8775014: Remove IOThread::message_loop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/proxy_service_factory.cc ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/browser/net/proxy_service_factory.cc ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698