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

Side by Side Diff: ipc/ipc_platform_file.cc

Issue 1862333002: ipc: Rename TakeFileHandleForProcess->TakePlatformFileForTransit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Created 4 years, 8 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
« 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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "ipc/ipc_platform_file.h" 6 #include "ipc/ipc_platform_file.h"
7 7
8 #if defined(OS_POSIX) 8 #if defined(OS_POSIX)
9 #include <unistd.h> 9 #include <unistd.h>
10 #endif 10 #endif
(...skipping 26 matching lines...) Expand all
37 // the other process from the I/O thread. Without the dup, calling code might 37 // the other process from the I/O thread. Without the dup, calling code might
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 return base::FileDescriptor(fd, true); 41 return base::FileDescriptor(fd, true);
42 #else 42 #else
43 #error Not implemented. 43 #error Not implemented.
44 #endif 44 #endif
45 } 45 }
46 46
47 PlatformFileForTransit TakeFileHandleForProcess(base::File file, 47 PlatformFileForTransit TakePlatformFileForTransit(base::File file) {
48 base::ProcessHandle process) {
49 return GetPlatformFileForTransit(file.TakePlatformFile(), true); 48 return GetPlatformFileForTransit(file.TakePlatformFile(), true);
50 } 49 }
51 50
52 } // namespace IPC 51 } // 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