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

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/loader/nonsfi/nonsfi_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index a451895fdd2f88da40c295de531cef1657a2538d..c7352f2810fb5d8986b977c8f691123aafe7d6e0 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -16,8 +16,8 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "components/nacl/common/nacl_messages.h"
#include "components/nacl/common/nacl_renderer_messages.h"
#include "components/nacl/common/nacl_switches.h"
@@ -143,16 +143,13 @@ void DebugStubPortSelectedHandler(uint16_t port) {
// the FD #.
void SetUpIPCAdapter(
IPC::ChannelHandle* handle,
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
struct NaClApp* nap,
int nacl_fd,
NaClIPCAdapter::ResolveFileTokenCallback resolve_file_token_cb,
NaClIPCAdapter::OpenResourceCallback open_resource_cb) {
- scoped_refptr<NaClIPCAdapter> ipc_adapter(
- new NaClIPCAdapter(*handle,
- message_loop_proxy.get(),
- resolve_file_token_cb,
- open_resource_cb));
+ scoped_refptr<NaClIPCAdapter> ipc_adapter(new NaClIPCAdapter(
+ *handle, task_runner.get(), resolve_file_token_cb, open_resource_cb));
ipc_adapter->ConnectChannel();
#if defined(OS_POSIX)
handle->socket =
@@ -263,8 +260,8 @@ void NaClListener::Listen() {
std::string channel_name =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessChannelID);
- channel_ = IPC::SyncChannel::Create(
- this, io_thread_.message_loop_proxy().get(), &shutdown_event_);
+ channel_ = IPC::SyncChannel::Create(this, io_thread_.task_runner().get(),
+ &shutdown_event_);
filter_ = new IPC::SyncMessageFilter(&shutdown_event_);
channel_->AddFilter(filter_.get());
channel_->AddFilter(new FileTokenMessageFilter());
@@ -363,28 +360,24 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
// Create the PPAPI IPC channels between the NaCl IRT and the host
// (browser/renderer) processes. The IRT uses these channels to
// communicate with the host and to initialize the IPC dispatchers.
- SetUpIPCAdapter(&browser_handle, io_thread_.message_loop_proxy(),
- nap, NACL_CHROME_DESC_BASE,
+ SetUpIPCAdapter(&browser_handle, io_thread_.task_runner(), nap,
+ NACL_CHROME_DESC_BASE,
NaClIPCAdapter::ResolveFileTokenCallback(),
NaClIPCAdapter::OpenResourceCallback());
- SetUpIPCAdapter(&ppapi_renderer_handle, io_thread_.message_loop_proxy(),
- nap, NACL_CHROME_DESC_BASE + 1,
+ SetUpIPCAdapter(&ppapi_renderer_handle, io_thread_.task_runner(), nap,
+ NACL_CHROME_DESC_BASE + 1,
NaClIPCAdapter::ResolveFileTokenCallback(),
NaClIPCAdapter::OpenResourceCallback());
- SetUpIPCAdapter(&manifest_service_handle,
- io_thread_.message_loop_proxy(),
- nap,
- NACL_CHROME_DESC_BASE + 2,
- base::Bind(&NaClListener::ResolveFileToken,
- base::Unretained(this)),
- base::Bind(&NaClListener::OnOpenResource,
- base::Unretained(this)));
+ SetUpIPCAdapter(
+ &manifest_service_handle, io_thread_.task_runner(), nap,
+ NACL_CHROME_DESC_BASE + 2,
+ base::Bind(&NaClListener::ResolveFileToken, base::Unretained(this)),
+ base::Bind(&NaClListener::OnOpenResource, base::Unretained(this)));
}
- trusted_listener_ = new NaClTrustedListener(
- IPC::Channel::GenerateVerifiedChannelID("nacl"),
- io_thread_.message_loop_proxy().get(),
- &shutdown_event_);
+ trusted_listener_ =
+ new NaClTrustedListener(IPC::Channel::GenerateVerifiedChannelID("nacl"),
+ io_thread_.task_runner().get(), &shutdown_event_);
if (!Send(new NaClProcessHostMsg_PpapiChannelsCreated(
browser_handle,
ppapi_renderer_handle,
« no previous file with comments | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/loader/nonsfi/nonsfi_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698