Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index d2021111c6f77d91b1730a56e758d6b985f0abe5..292bc3b13cccac09da5385d2a6af60c7fe744b04 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/message_loop.h" |
| #include "base/metrics/field_trial.h" |
| #include "base/metrics/histogram.h" |
| +#include "base/run_loop.h" |
| #include "base/string_number_conversions.h" |
| #include "base/threading/thread_restrictions.h" |
| #include "content/browser/browser_thread_impl.h" |
| @@ -648,16 +649,16 @@ void BrowserMainLoop::InitializeToolkit() { |
| } |
| void BrowserMainLoop::MainMessageLoopRun() { |
| + DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| if (parameters_.ui_task) |
| MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
| -#if defined(OS_MACOSX) |
| - MessageLoopForUI::current()->Run(); |
| -#elif defined(OS_ANDROID) |
| +#if defined(OS_ANDROID) |
| // Android's main message loop is the Java message loop. |
| NOTREACHED(); |
| #else |
|
jar (doing other things)
2012/06/23 02:43:19
Can you move lines 652-654 into this #else clause?
jbates
2012/06/25 20:04:57
Done.
|
| - MessageLoopForUI::current()->RunWithDispatcher(NULL); |
| + base::RunLoop run_loop; |
| + run_loop.Run(); |
| #endif |
| } |