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

Unified Diff: chrome/browser/web_resource/web_resource_service.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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/web_resource_service.cc
===================================================================
--- chrome/browser/web_resource/web_resource_service.cc (revision 30521)
+++ chrome/browser/web_resource/web_resource_service.cc (working copy)
@@ -118,11 +118,13 @@
#endif
if (use_utility_process) {
+ ChromeThread::ID thread_id;
+ CHECK(ChromeThread::GetCurrentThreadIdentifier(&thread_id));
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(this, &UnpackerClient::StartProcessOnIOThread,
web_resource_service_->resource_dispatcher_host_,
- MessageLoop::current()));
+ thread_id));
} else {
WebResourceUnpacker unpacker(json_data_);
if (unpacker.Run()) {
@@ -164,8 +166,8 @@
}
void StartProcessOnIOThread(ResourceDispatcherHost* rdh,
- MessageLoop* file_loop) {
- UtilityProcessHost* host = new UtilityProcessHost(rdh, this, file_loop);
+ ChromeThread::ID thread_id) {
+ UtilityProcessHost* host = new UtilityProcessHost(rdh, this, thread_id);
// TODO(mrc): get proper file path when we start using web resources
// that need to be unpacked.
host->StartWebResourceUnpacker(json_data_);
« no previous file with comments | « chrome/browser/utility_process_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698