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

Unified Diff: chrome/browser/spellchecker.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/spellchecker.cc
===================================================================
--- chrome/browser/spellchecker.cc (revision 30037)
+++ chrome/browser/spellchecker.cc (working copy)
@@ -200,8 +200,8 @@
} // Unsuccessful save is taken care of in SpellChecker::Initialize().
// Set Flag that dictionary is not downloading anymore.
- MessageLoop* ui_loop = ChromeThread::GetMessageLoop(ChromeThread::UI);
- ui_loop->PostTask(FROM_HERE,
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
new UIProxyForIOTask(on_dictionary_save_complete_callback_task_, NULL));
}
@@ -268,12 +268,13 @@
Task* task = NewRunnableMethod(spellchecker_, &SpellChecker::HunspellInited,
hunspell_, bdict_file_, file_existed);
if (spellchecker_->file_loop_) {
- MessageLoop* ui_loop = ChromeThread::GetMessageLoop(ChromeThread::UI);
// We were called on the file loop. Post back to the IO loop.
// If this never gets posted to the IO loop, then we will leak |hunspell_|
// and |bdict_file_|. But that can only happen during shutdown, so it's
// not worth caring about.
- ui_loop->PostTask(FROM_HERE, new UIProxyForIOTask(task, spellchecker_));
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ new UIProxyForIOTask(task, spellchecker_));
} else {
// We were called directly (e.g., during testing). Run the task directly.
task->Run();

Powered by Google App Engine
This is Rietveld 408576698