Index: components/nacl/common/nacl_types.h |
diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h |
index 6107dcaed3450035da7f031d7612bc3721f0d398..a91722e8f7bd637b361fe3698ed5b8329f13c9ce 100644 |
--- a/components/nacl/common/nacl_types.h |
+++ b/components/nacl/common/nacl_types.h |
@@ -16,29 +16,9 @@ |
#include "ipc/ipc_channel.h" |
#include "ipc/ipc_platform_file.h" |
-#if defined(OS_POSIX) |
-#include "base/file_descriptor_posix.h" |
-#endif |
- |
-#if defined(OS_WIN) |
-#include <windows.h> // for HANDLE |
-#endif |
- |
// TODO(gregoryd): add a Windows definition for base::FileDescriptor |
Mark Seaborn
2015/05/06 21:24:53
You can remove this comment too.
hidehiko
2015/05/07 01:29:07
Done.
|
namespace nacl { |
-#if defined(OS_WIN) |
-typedef HANDLE FileDescriptor; |
Mark Seaborn
2015/05/06 21:24:53
Thanks for removing this old stuff!
hidehiko
2015/05/07 01:29:07
Acknowledged.
|
-inline HANDLE ToNativeHandle(const FileDescriptor& desc) { |
- return desc; |
-} |
-#elif defined(OS_POSIX) |
-typedef base::FileDescriptor FileDescriptor; |
-inline int ToNativeHandle(const FileDescriptor& desc) { |
- return desc.fd; |
-} |
-#endif |
- |
// We allocate a page of shared memory for sharing crash information from |
// trusted code in the NaCl process to the renderer. |
static const int kNaClCrashInfoShmemSize = 4096; |
@@ -74,7 +54,7 @@ struct NaClResourcePrefetchRequest { |
// a NaCl manifest file. |
struct NaClResourcePrefetchResult { |
NaClResourcePrefetchResult(); |
- NaClResourcePrefetchResult(IPC::PlatformFileForTransit file, |
+ NaClResourcePrefetchResult(const IPC::PlatformFileForTransit& file, |
const base::FilePath& file_path, |
const std::string& file_key); |
~NaClResourcePrefetchResult(); |
@@ -161,7 +141,7 @@ struct NaClLaunchParams { |
struct NaClLaunchResult { |
NaClLaunchResult(); |
NaClLaunchResult( |
- FileDescriptor imc_channel_handle, |
+ const IPC::PlatformFileForTransit& imc_channel_handle, |
const IPC::ChannelHandle& ppapi_ipc_channel_handle, |
const IPC::ChannelHandle& trusted_ipc_channel_handle, |
const IPC::ChannelHandle& manifest_service_ipc_channel_handle, |
@@ -171,7 +151,7 @@ struct NaClLaunchResult { |
~NaClLaunchResult(); |
// For plugin loader <-> renderer IMC communication. |
- FileDescriptor imc_channel_handle; |
+ IPC::PlatformFileForTransit imc_channel_handle; |
// For plugin <-> renderer PPAPI communication. |
IPC::ChannelHandle ppapi_ipc_channel_handle; |