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

Side by Side Diff: content/common/child_process_host_impl.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/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 opening_channel_ = true; 181 opening_channel_ = true;
182 182
183 return channel_id_; 183 return channel_id_;
184 } 184 }
185 185
186 bool ChildProcessHostImpl::IsChannelOpening() { 186 bool ChildProcessHostImpl::IsChannelOpening() {
187 return opening_channel_; 187 return opening_channel_;
188 } 188 }
189 189
190 #if defined(OS_POSIX) 190 #if defined(OS_POSIX)
191 int ChildProcessHostImpl::TakeClientFileDescriptor() { 191 base::ScopedFD ChildProcessHostImpl::TakeClientFileDescriptor() {
192 return channel_->TakeClientFileDescriptor(); 192 return channel_->TakeClientFileDescriptor();
193 } 193 }
194 #endif 194 #endif
195 195
196 bool ChildProcessHostImpl::Send(IPC::Message* message) { 196 bool ChildProcessHostImpl::Send(IPC::Message* message) {
197 if (!channel_) { 197 if (!channel_) {
198 delete message; 198 delete message;
199 return false; 199 return false;
200 } 200 }
201 return channel_->Send(message); 201 return channel_->Send(message);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 void ChildProcessHostImpl::GpuMemoryBufferAllocated( 352 void ChildProcessHostImpl::GpuMemoryBufferAllocated(
353 IPC::Message* reply, 353 IPC::Message* reply,
354 const gfx::GpuMemoryBufferHandle& handle) { 354 const gfx::GpuMemoryBufferHandle& handle) {
355 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, 355 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
356 handle); 356 handle);
357 Send(reply); 357 Send(reply);
358 } 358 }
359 359
360 } // namespace content 360 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698