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

Unified Diff: mojo/application/public/cpp/lib/content_handler_factory.cc

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 5 years, 6 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
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | mojo/common/handle_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/lib/content_handler_factory.cc
diff --git a/mojo/application/public/cpp/lib/content_handler_factory.cc b/mojo/application/public/cpp/lib/content_handler_factory.cc
index 9b4d2717f327002d7987cfb51d3cbfcf6e5d61c2..a05c95466acaf92bd492eb09a915f8419868a039 100644
--- a/mojo/application/public/cpp/lib/content_handler_factory.cc
+++ b/mojo/application/public/cpp/lib/content_handler_factory.cc
@@ -9,6 +9,8 @@
#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/public/cpp/application_connection.h"
#include "mojo/application/public/cpp/application_delegate.h"
@@ -25,7 +27,7 @@ namespace {
class ApplicationThread : public base::PlatformThread::Delegate {
public:
ApplicationThread(
- scoped_refptr<base::MessageLoopProxy> handler_thread,
+ scoped_refptr<base::SingleThreadTaskRunner> handler_thread,
const base::Callback<void(ApplicationThread*)>& termination_callback,
ContentHandlerFactory::Delegate* handler_delegate,
InterfaceRequest<Application> application_request,
@@ -44,7 +46,7 @@ class ApplicationThread : public base::PlatformThread::Delegate {
base::Bind(termination_callback_, this));
}
- scoped_refptr<base::MessageLoopProxy> handler_thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> handler_thread_;
base::Callback<void(ApplicationThread*)> termination_callback_;
ContentHandlerFactory::Delegate* handler_delegate_;
InterfaceRequest<Application> application_request_;
@@ -77,7 +79,7 @@ class ContentHandlerImpl : public ContentHandler {
void StartApplication(InterfaceRequest<Application> application_request,
URLResponsePtr response) override {
ApplicationThread* thread = new ApplicationThread(
- base::MessageLoopProxy::current(),
+ base::ThreadTaskRunnerHandle::Get(),
base::Bind(&ContentHandlerImpl::OnThreadEnd,
weak_factory_.GetWeakPtr()),
delegate_, application_request.Pass(), response.Pass());
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | mojo/common/handle_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698