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

Side by Side Diff: content/plugin/plugin_thread.cc

Issue 621613002: Refactoring: Make IPC::Channel::TakeClientFileDescriptor() a ScopedFD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Mac build Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/plugin/plugin_thread.h" 5 #include "content/plugin/plugin_thread.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 #include <CoreFoundation/CoreFoundation.h> 10 #include <CoreFoundation/CoreFoundation.h>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void PluginThread::OnCreateChannel(int renderer_id, 139 void PluginThread::OnCreateChannel(int renderer_id,
140 bool incognito) { 140 bool incognito) {
141 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( 141 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel(
142 renderer_id, ChildProcess::current()->io_message_loop_proxy())); 142 renderer_id, ChildProcess::current()->io_message_loop_proxy()));
143 IPC::ChannelHandle channel_handle; 143 IPC::ChannelHandle channel_handle;
144 if (channel.get()) { 144 if (channel.get()) {
145 channel_handle.name = channel->channel_handle().name; 145 channel_handle.name = channel->channel_handle().name;
146 #if defined(OS_POSIX) 146 #if defined(OS_POSIX)
147 // On POSIX, pass the renderer-side FD. 147 // On POSIX, pass the renderer-side FD.
148 channel_handle.socket = 148 channel_handle.socket =
149 base::FileDescriptor(channel->TakeRendererFileDescriptor(), true); 149 base::FileDescriptor(channel->TakeRendererFileDescriptor());
150 #endif 150 #endif
151 channel->set_incognito(incognito); 151 channel->set_incognito(incognito);
152 } 152 }
153 153
154 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); 154 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle));
155 } 155 }
156 156
157 void PluginThread::OnNotifyRenderersOfPendingShutdown() { 157 void PluginThread::OnNotifyRenderersOfPendingShutdown() {
158 PluginChannel::NotifyRenderersOfPendingShutdown(); 158 PluginChannel::NotifyRenderersOfPendingShutdown();
159 } 159 }
160 160
161 } // namespace content 161 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698