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

Unified Diff: content/child/npapi/np_channel_base.cc

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. 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 | « content/child/npapi/np_channel_base.h ('k') | content/child/npapi/plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/npapi/np_channel_base.cc
diff --git a/content/child/npapi/np_channel_base.cc b/content/child/npapi/np_channel_base.cc
index c39ff4cdc2a657185498289dbd01f14ae7ffb392..c227c88c56f616599f5a69d92e4cc2e1697257a4 100644
--- a/content/child/npapi/np_channel_base.cc
+++ b/content/child/npapi/np_channel_base.cc
@@ -8,6 +8,7 @@
#include "base/containers/hash_tables.h"
#include "base/files/scoped_file.h"
#include "base/lazy_instance.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_local.h"
#include "ipc/ipc_sync_message.h"
@@ -62,9 +63,12 @@ ChannelMap* GetChannelMap() {
} // namespace
NPChannelBase* NPChannelBase::GetChannel(
- const IPC::ChannelHandle& channel_handle, IPC::Channel::Mode mode,
- ChannelFactory factory, base::MessageLoopProxy* ipc_message_loop,
- bool create_pipe_now, base::WaitableEvent* shutdown_event) {
+ const IPC::ChannelHandle& channel_handle,
+ IPC::Channel::Mode mode,
+ ChannelFactory factory,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ bool create_pipe_now,
+ base::WaitableEvent* shutdown_event) {
#if defined(OS_POSIX)
// On POSIX the channel_handle conveys an FD (socket) which is duped by the
// kernel during the IPC message exchange (via the SCM_RIGHTS mechanism).
@@ -94,7 +98,7 @@ NPChannelBase* NPChannelBase::GetChannel(
IPC::Channel::GenerateVerifiedChannelID(channel_key);
}
channel->mode_ = mode;
- if (channel->Init(ipc_message_loop, create_pipe_now, shutdown_event)) {
+ if (channel->Init(ipc_task_runner, create_pipe_now, shutdown_event)) {
(*GetChannelMap())[channel_key] = channel;
} else {
channel = NULL;
@@ -168,7 +172,7 @@ base::WaitableEvent* NPChannelBase::GetModalDialogEvent(int render_view_id) {
return NULL;
}
-bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop,
+bool NPChannelBase::Init(base::SingleThreadTaskRunner* ipc_task_runner,
bool create_pipe_now,
base::WaitableEvent* shutdown_event) {
#if defined(OS_POSIX)
@@ -178,9 +182,9 @@ bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop,
return false;
#endif
- channel_ = IPC::SyncChannel::Create(
- channel_handle_, mode_, this, ipc_message_loop, create_pipe_now,
- shutdown_event);
+ channel_ =
+ IPC::SyncChannel::Create(channel_handle_, mode_, this, ipc_task_runner,
+ create_pipe_now, shutdown_event);
#if defined(OS_POSIX)
// Check the validity of fd for bug investigation. Remove after fixed.
« no previous file with comments | « content/child/npapi/np_channel_base.h ('k') | content/child/npapi/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698