| Index: ipc/ipc_message_utils.cc
|
| diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
|
| index db36c0fe7a62622fd0b7e4489c2bfdfd26f4a2f7..68f07f8795f480a6faa9dfb94695ef2dcffe78cf 100644
|
| --- a/ipc/ipc_message_utils.cc
|
| +++ b/ipc/ipc_message_utils.cc
|
| @@ -35,6 +35,7 @@
|
| #if defined(OS_WIN)
|
| #include <tchar.h>
|
| #include "ipc/handle_win.h"
|
| +#include "ipc/ipc_platform_file.h"
|
| #endif
|
|
|
| namespace IPC {
|
| @@ -842,6 +843,35 @@ void ParamTraits<base::SharedMemoryHandle>::Log(const param_type& p,
|
| }
|
| #endif // defined(OS_MACOSX) && !defined(OS_IOS)
|
|
|
| +#if defined(OS_WIN)
|
| +void ParamTraits<PlatformFileForTransit>::GetSize(base::PickleSizer* s,
|
| + const param_type& p) {
|
| + GetParamSize(s, p.GetHandle());
|
| +}
|
| +
|
| +void ParamTraits<PlatformFileForTransit>::Write(base::Pickle* m,
|
| + const param_type& p) {
|
| + HandleWin handle_win(p.GetHandle(), HandleWin::DUPLICATE);
|
| + ParamTraits<HandleWin>::Write(m, handle_win);
|
| + ::CloseHandle(p.GetHandle());
|
| +}
|
| +
|
| +bool ParamTraits<PlatformFileForTransit>::Read(const base::Pickle* m,
|
| + base::PickleIterator* iter,
|
| + param_type* r) {
|
| + HandleWin handle_win;
|
| + if (!ParamTraits<HandleWin>::Read(m, iter, &handle_win))
|
| + return false;
|
| + *r = PlatformFileForTransit(handle_win.get_handle());
|
| + return true;
|
| +}
|
| +
|
| +void ParamTraits<PlatformFileForTransit>::Log(const param_type& p,
|
| + std::string* l) {
|
| + LogParam(p.GetHandle(), l);
|
| +}
|
| +#endif // defined(OS_WIN)
|
| +
|
| void ParamTraits<base::FilePath>::GetSize(base::PickleSizer* sizer,
|
| const param_type& p) {
|
| p.GetSizeForPickle(sizer);
|
|
|