diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 22:55:17 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 22:55:17 +0000 |
commit | cb6037d67847a6341eea166baf1d4051667a0b88 (patch) | |
tree | 2b766762057e96d758385b96e2a576d7b6690d54 /ipc | |
parent | f9be34d622561d5599603b41d1c43d595e503426 (diff) | |
download | chromium_src-cb6037d67847a6341eea166baf1d4051667a0b88.zip chromium_src-cb6037d67847a6341eea166baf1d4051667a0b88.tar.gz chromium_src-cb6037d67847a6341eea166baf1d4051667a0b88.tar.bz2 |
reland 31875. Revert was:
------
Revert 31875 to see whether it fixes reliability bot.
BUG=25677
TEST=None
------
TBR=huanr
Review URL: http://codereview.chromium.org/397017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc.gyp | 1 | ||||
-rw-r--r-- | ipc/ipc_platform_file.h | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp index 8f2698c..8e393be 100644 --- a/ipc/ipc.gyp +++ b/ipc/ipc.gyp @@ -52,6 +52,7 @@ 'ipc_message_macros.h', 'ipc_message_utils.cc', 'ipc_message_utils.h', + 'ipc_platform_file.h', 'ipc_switches.cc', 'ipc_switches.h', 'ipc_sync_channel.cc', diff --git a/ipc/ipc_platform_file.h b/ipc/ipc_platform_file.h new file mode 100644 index 0000000..4307412 --- /dev/null +++ b/ipc/ipc_platform_file.h @@ -0,0 +1,35 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IPC_IPC_PLATFORM_FILE_H_ +#define IPC_IPC_PLATFORM_FILE_H_ + +#include "base/basictypes.h" + +#include "base/platform_file.h" + +#if defined(OS_POSIX) +#include "base/file_descriptor_posix.h" +#endif + +namespace IPC { + +#if defined(OS_WIN) +typedef base::PlatformFile PlatformFileForTransit; +#elif defined(OS_POSIX) +typedef base::FileDescriptor PlatformFileForTransit; +#endif + +inline base::PlatformFile PlatformFileForTransitToPlatformFile( + const PlatformFileForTransit& transit) { +#if defined(OS_WIN) + return transit; +#elif defined(OS_POSIX) + return transit.fd; +#endif +} + +} // namespace IPC + +#endif // IPC_IPC_PLATFORM_FILE_H_ |