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

Unified Diff: chrome/renderer/plugin_channel_host.cc

Issue 5598010: Convert over to channel handles (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed up bad whitespace Created 10 years 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
Index: chrome/renderer/plugin_channel_host.cc
diff --git a/chrome/renderer/plugin_channel_host.cc b/chrome/renderer/plugin_channel_host.cc
index 1a1e03fa68fb9b1bdac1fb477d50b2f77539a69a..b6a93c06927b03d3fc15f284dfe0cebdc0530aed 100644
--- a/chrome/renderer/plugin_channel_host.cc
+++ b/chrome/renderer/plugin_channel_host.cc
@@ -68,10 +68,10 @@ void PluginChannelHost::SetListening(bool flag) {
}
PluginChannelHost* PluginChannelHost::GetPluginChannelHost(
- const std::string& channel_name, MessageLoop* ipc_message_loop) {
+ const IPC::ChannelHandle& channel_handle, MessageLoop* ipc_message_loop) {
PluginChannelHost* result =
static_cast<PluginChannelHost*>(PluginChannelBase::GetChannel(
- channel_name,
+ channel_handle,
IPC::Channel::MODE_CLIENT,
ClassFactory,
ipc_message_loop,
@@ -87,19 +87,6 @@ PluginChannelHost::~PluginChannelHost() {
bool PluginChannelHost::Init(MessageLoop* ipc_message_loop,
bool create_pipe_now) {
-#if defined(OS_POSIX)
- if (!IPC::ChannelSocketExists(channel_name())) {
- // Attempting to use this IPC channel would result in a crash
- // inside IPC code within the PluginChannelBase::Init call. The plugin
- // channel in the plugin process is supposed to have created this channel
- // and sent it to this process, the renderer process. If this channel
- // closes and is removed, it cannot be reused until the plugin process
- // recreates it.
- LOG(ERROR) << "Refusing use of missing IPC channel " << channel_name();
- return false;
- }
-#endif
-
bool ret = PluginChannelBase::Init(ipc_message_loop, create_pipe_now);
is_listening_filter_ = new IsListeningFilter;
channel_->AddFilter(is_listening_filter_);

Powered by Google App Engine
This is Rietveld 408576698