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

Side by Side Diff: ipc/ipc_platform_file.cc

Issue 8437033: Android IPC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply dmac feedback plus sync/merge Created 9 years, 1 month 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_message_macros.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ANDROID)
8 #include <unistd.h>
9 #endif
10
7 namespace IPC { 11 namespace IPC {
8 12
9 PlatformFileForTransit GetFileHandleForProcess(base::PlatformFile handle, 13 PlatformFileForTransit GetFileHandleForProcess(base::PlatformFile handle,
10 base::ProcessHandle process, 14 base::ProcessHandle process,
11 bool close_source_handle) { 15 bool close_source_handle) {
12 IPC::PlatformFileForTransit out_handle; 16 IPC::PlatformFileForTransit out_handle;
13 #if defined(OS_WIN) 17 #if defined(OS_WIN)
14 DWORD options = DUPLICATE_SAME_ACCESS; 18 DWORD options = DUPLICATE_SAME_ACCESS;
15 if (close_source_handle) 19 if (close_source_handle)
16 options |= DUPLICATE_CLOSE_SOURCE; 20 options |= DUPLICATE_CLOSE_SOURCE;
(...skipping 17 matching lines...) Expand all
34 // condition. 38 // condition.
35 int fd = close_source_handle ? handle : ::dup(handle); 39 int fd = close_source_handle ? handle : ::dup(handle);
36 out_handle = base::FileDescriptor(fd, true); 40 out_handle = base::FileDescriptor(fd, true);
37 #else 41 #else
38 #error Not implemented. 42 #error Not implemented.
39 #endif 43 #endif
40 return out_handle; 44 return out_handle;
41 } 45 }
42 46
43 } // namespace IPC 47 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message_macros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698