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

Side by Side Diff: ipc/ipc_platform_file.cc

Issue 165663002: Remove some PlatformFile uses from NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add empty line Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_platform_file.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ipc/ipc_platform_file.h" 5 #include "ipc/ipc_platform_file.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <unistd.h> 8 #include <unistd.h>
9 #endif 9 #endif
10 10
(...skipping 27 matching lines...) Expand all
38 // close the source handle before the message is sent, creating a race 38 // close the source handle before the message is sent, creating a race
39 // condition. 39 // condition.
40 int fd = close_source_handle ? handle : ::dup(handle); 40 int fd = close_source_handle ? handle : ::dup(handle);
41 out_handle = base::FileDescriptor(fd, true); 41 out_handle = base::FileDescriptor(fd, true);
42 #else 42 #else
43 #error Not implemented. 43 #error Not implemented.
44 #endif 44 #endif
45 return out_handle; 45 return out_handle;
46 } 46 }
47 47
48 PlatformFileForTransit TakeFileHandleForProcess(base::File file,
49 base::ProcessHandle process) {
50 return GetFileHandleForProcess(file.TakePlatformFile(), process, true);
51 }
52
48 } // namespace IPC 53 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_platform_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698