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

Unified Diff: chrome/browser/utility_process_host.cc

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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/utility_process_host.h ('k') | chrome/browser/utility_process_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/utility_process_host.cc
===================================================================
--- chrome/browser/utility_process_host.cc (revision 30521)
+++ chrome/browser/utility_process_host.cc (working copy)
@@ -26,10 +26,10 @@
UtilityProcessHost::UtilityProcessHost(ResourceDispatcherHost* rdh,
Client* client,
- MessageLoop* client_loop)
+ ChromeThread::ID client_thread_id)
: ChildProcessHost(UTILITY_PROCESS, rdh),
client_(client),
- client_loop_(client_loop) {
+ client_thread_id_(client_thread_id) {
}
UtilityProcessHost::~UtilityProcessHost() {
@@ -139,7 +139,8 @@
}
void UtilityProcessHost::OnMessageReceived(const IPC::Message& message) {
- client_loop_->PostTask(FROM_HERE,
+ ChromeThread::PostTask(
+ client_thread_id_, FROM_HERE,
NewRunnableMethod(client_.get(), &Client::OnMessageReceived, message));
}
@@ -147,7 +148,8 @@
bool child_exited;
bool did_crash = base::DidProcessCrash(&child_exited, handle());
if (did_crash) {
- client_loop_->PostTask(FROM_HERE,
+ ChromeThread::PostTask(
+ client_thread_id_, FROM_HERE,
NewRunnableMethod(client_.get(), &Client::OnProcessCrashed));
}
}
« no previous file with comments | « chrome/browser/utility_process_host.h ('k') | chrome/browser/utility_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698