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

Side by Side Diff: ipc/ipc_platform_file.h

Issue 209193002: Remove PlatformFile from spell checker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert IsEnabled behavior Created 6 years, 9 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 | « chrome/renderer/spellchecker/spelling_engine.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 #ifndef IPC_IPC_PLATFORM_FILE_H_ 5 #ifndef IPC_IPC_PLATFORM_FILE_H_
6 #define IPC_IPC_PLATFORM_FILE_H_ 6 #define IPC_IPC_PLATFORM_FILE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 22 matching lines...) Expand all
33 33
34 inline base::PlatformFile PlatformFileForTransitToPlatformFile( 34 inline base::PlatformFile PlatformFileForTransitToPlatformFile(
35 const PlatformFileForTransit& transit) { 35 const PlatformFileForTransit& transit) {
36 #if defined(OS_WIN) 36 #if defined(OS_WIN)
37 return transit; 37 return transit;
38 #elif defined(OS_POSIX) 38 #elif defined(OS_POSIX)
39 return transit.fd; 39 return transit.fd;
40 #endif 40 #endif
41 } 41 }
42 42
43 inline base::File PlatformFileForTransitToFile(
44 const PlatformFileForTransit& transit) {
45 #if defined(OS_WIN)
46 return base::File(transit);
47 #elif defined(OS_POSIX)
48 return base::File(transit.fd);
49 #endif
50 }
51
43 // Returns a file handle equivalent to |file| that can be used in |process|. 52 // Returns a file handle equivalent to |file| that can be used in |process|.
44 IPC_EXPORT PlatformFileForTransit GetFileHandleForProcess( 53 IPC_EXPORT PlatformFileForTransit GetFileHandleForProcess(
45 base::PlatformFile file, 54 base::PlatformFile file,
46 base::ProcessHandle process, 55 base::ProcessHandle process,
47 bool close_source_handle); 56 bool close_source_handle);
48 57
49 // Returns a file handle equivalent to |file| that can be used in |process|. 58 // Returns a file handle equivalent to |file| that can be used in |process|.
50 // Note that this function takes ownership of |file|. 59 // Note that this function takes ownership of |file|.
51 IPC_EXPORT PlatformFileForTransit TakeFileHandleForProcess( 60 IPC_EXPORT PlatformFileForTransit TakeFileHandleForProcess(
52 base::File file, 61 base::File file,
53 base::ProcessHandle process); 62 base::ProcessHandle process);
54 63
55 } // namespace IPC 64 } // namespace IPC
56 65
57 #endif // IPC_IPC_PLATFORM_FILE_H_ 66 #endif // IPC_IPC_PLATFORM_FILE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/spelling_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698