Index: mojo/application/content_handler_factory.cc |
diff --git a/mojo/application/content_handler_factory.cc b/mojo/application/content_handler_factory.cc |
index a7e5d2cc53645caafbb6f9b9e2d6763e954303c6..8518f4c937ff4f3eb18dc1e15b6afdb6eb61ba5d 100644 |
--- a/mojo/application/content_handler_factory.cc |
+++ b/mojo/application/content_handler_factory.cc |
@@ -9,8 +9,6 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/memory/weak_ptr.h" |
-#include "base/single_thread_task_runner.h" |
-#include "base/thread_task_runner_handle.h" |
#include "base/threading/platform_thread.h" |
#include "mojo/application/application_runner_chromium.h" |
#include "mojo/common/message_pump_mojo.h" |
@@ -27,7 +25,7 @@ |
class ApplicationThread : public base::PlatformThread::Delegate { |
public: |
ApplicationThread( |
- scoped_refptr<base::SingleThreadTaskRunner> handler_thread, |
+ scoped_refptr<base::MessageLoopProxy> handler_thread, |
const base::Callback<void(ApplicationThread*)>& termination_callback, |
ContentHandlerFactory::Delegate* handler_delegate, |
InterfaceRequest<Application> application_request, |
@@ -46,7 +44,7 @@ |
base::Bind(termination_callback_, this)); |
} |
- scoped_refptr<base::SingleThreadTaskRunner> handler_thread_; |
+ scoped_refptr<base::MessageLoopProxy> handler_thread_; |
base::Callback<void(ApplicationThread*)> termination_callback_; |
ContentHandlerFactory::Delegate* handler_delegate_; |
InterfaceRequest<Application> application_request_; |
@@ -78,13 +76,11 @@ |
// Overridden from ContentHandler: |
void StartApplication(InterfaceRequest<Application> application_request, |
URLResponsePtr response) override { |
- ApplicationThread* thread = |
- new ApplicationThread(base::ThreadTaskRunnerHandle::Get(), |
- base::Bind(&ContentHandlerImpl::OnThreadEnd, |
- weak_factory_.GetWeakPtr()), |
- delegate_, |
- application_request.Pass(), |
- response.Pass()); |
+ ApplicationThread* thread = new ApplicationThread( |
+ base::MessageLoopProxy::current(), |
+ base::Bind(&ContentHandlerImpl::OnThreadEnd, |
+ weak_factory_.GetWeakPtr()), |
+ delegate_, application_request.Pass(), response.Pass()); |
base::PlatformThreadHandle handle; |
bool launched = base::PlatformThread::Create(0, thread, &handle); |
DCHECK(launched); |