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

Unified Diff: chrome/browser/chrome_plugin_host.cc

Issue 306032: Simplify threading in browser thread by making only ChromeThread deal with di... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: a few more simplifications 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
Index: chrome/browser/chrome_plugin_host.cc
===================================================================
--- chrome/browser/chrome_plugin_host.cc (revision 30037)
+++ chrome/browser/chrome_plugin_host.cc (working copy)
@@ -735,13 +735,10 @@
CPError STDCALL CPB_PluginThreadAsyncCall(CPID id,
void (*func)(void *),
void *user_data) {
- MessageLoop *message_loop = ChromeThread::GetMessageLoop(ChromeThread::IO);
- if (!message_loop) {
- return CPERR_FAILURE;
- }
- message_loop->PostTask(FROM_HERE, NewRunnableFunction(func, user_data));
-
- return CPERR_SUCCESS;
+ bool posted = ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableFunction(func, user_data));
+ return posted ? CPERR_SUCCESS : CPERR_FAILURE;
}
CPError STDCALL CPB_OpenFileDialog(CPID id,

Powered by Google App Engine
This is Rietveld 408576698