Index: base/message_loop/message_loop.cc |
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc |
index e84765a0f7a7e022764ce0db1509f572745c51a0..88f75e91e5b6863ae260a3530a0bd803da095809 100644 |
--- a/base/message_loop/message_loop.cc |
+++ b/base/message_loop/message_loop.cc |
@@ -398,7 +398,7 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory) |
new internal::MessageLoopTaskRunner(incoming_task_queue_)), |
task_runner_(unbound_task_runner_) { |
// If type is TYPE_CUSTOM non-null pump_factory must be given. |
- DCHECK_EQ(type_ == TYPE_CUSTOM, !pump_factory_.is_null()); |
+ DCHECK(type_ != TYPE_CUSTOM || !pump_factory_.is_null()); |
} |
void MessageLoop::BindToCurrentThread() { |
@@ -684,6 +684,10 @@ void MessageLoop::ReleaseSoonInternal( |
//------------------------------------------------------------------------------ |
// MessageLoopForUI |
+MessageLoopForUI::MessageLoopForUI(scoped_ptr<MessagePump> pump) |
+ : MessageLoop(TYPE_UI, Bind(&ReturnPump, Passed(&pump))) { |
+} |
+ |
#if defined(OS_ANDROID) |
void MessageLoopForUI::Start() { |
// No Histogram support for UI message loop as it is managed by Java side |