Index: components/nacl/browser/nacl_host_message_filter.cc |
diff --git a/components/nacl/browser/nacl_host_message_filter.cc b/components/nacl/browser/nacl_host_message_filter.cc |
index 1334ffaf8de5ba67a6b075d7a1ff242e5881c4f9..962b2b2bb8248b53991f9af2dc3d47eb8fa65052 100644 |
--- a/components/nacl/browser/nacl_host_message_filter.cc |
+++ b/components/nacl/browser/nacl_host_message_filter.cc |
@@ -102,13 +102,13 @@ void NaClHostMessageFilter::OnGetReadonlyPnaclFd( |
// NaClHostMsg_NaClCreateTemporaryFile sync message. |
void NaClHostMessageFilter::SyncReturnTemporaryFile( |
IPC::Message* reply_msg, |
- base::PlatformFile fd) { |
- if (fd == base::kInvalidPlatformFileValue) { |
- reply_msg->set_reply_error(); |
- } else { |
+ base::File file) { |
+ if (file.IsValid()) { |
NaClHostMsg_NaClCreateTemporaryFile::WriteReplyParams( |
reply_msg, |
- IPC::GetFileHandleForProcess(fd, PeerHandle(), true)); |
+ IPC::TakeFileHandleForProcess(file.Pass(), PeerHandle())); |
+ } else { |
+ reply_msg->set_reply_error(); |
} |
Send(reply_msg); |
} |