diff --git a/content/renderer/pepper/pepper_file_io_host.cc b/content/renderer/pepper/pepper_file_io_host.cc
index f058792..b96edf5 100644
--- a/content/renderer/pepper/pepper_file_io_host.cc
+++ b/content/renderer/pepper/pepper_file_io_host.cc
@@ -150,6 +150,8 @@ int32_t PepperFileIOHost::OnResourceMessageReceived(
                                       OnHostMsgWillSetLength)
     PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FileIO_GetOSFileDescriptor,
                                         OnHostMsgGetOSFileDescriptor)
+    PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FileIO_RequestOSFileHandle,
+                                        OnHostMsgRequestOSFileHandle)
   IPC_END_MESSAGE_MAP()
   return PP_ERROR_FAILED;
 }
@@ -449,7 +451,7 @@ int32_t PepperFileIOHost::OnHostMsgWillSetLength(
   return PP_OK_COMPLETIONPENDING;
 }
 
-int32_t PepperFileIOHost::OnHostMsgGetOSFileDescriptor(
+int32_t PepperFileIOHost::OnHostMsgRequestOSFileHandle(
     ppapi::host::HostMessageContext* context) {
   if (!is_running_in_process_ &&
       !GetContentClient()->renderer()->IsRequestOSFileHandleAllowedForURL(
@@ -471,7 +473,26 @@ int32_t PepperFileIOHost::OnHostMsgGetOSFileDescriptor(
   reply_context.params.AppendHandle(ppapi::proxy::SerializedHandle(
       ppapi::proxy::SerializedHandle::FILE, file));
   host()->SendReply(reply_context,
-                    PpapiPluginMsg_FileIO_GetOSFileDescriptorReply());
+                    PpapiPluginMsg_FileIO_RequestOSFileHandleReply());
+  return PP_OK_COMPLETIONPENDING;
+}
+
+int32_t PepperFileIOHost::OnHostMsgGetOSFileDescriptor(
+    ppapi::host::HostMessageContext* context) {
+  if (!is_running_in_process_)
+    return PP_ERROR_FAILED;
+
+  int32_t fd =
+#if defined(OS_POSIX)
+      file_;
+#elif defined(OS_WIN)
+      reinterpret_cast<uintptr_t>(file_);
+#else
+      -1;
+#endif
+
+  host()->SendReply(context->MakeReplyMessageContext(),
+                    PpapiPluginMsg_FileIO_GetOSFileDescriptorReply(fd));
   return PP_OK_COMPLETIONPENDING;
 }
 
diff --git a/content/renderer/pepper/pepper_file_io_host.h b/content/renderer/pepper/pepper_file_io_host.h
index 615c30d..6f3ab97 100644
--- a/content/renderer/pepper/pepper_file_io_host.h
+++ b/content/renderer/pepper/pepper_file_io_host.h
@@ -59,6 +59,9 @@ class PepperFileIOHost : public ppapi::host::ResourceHost,
                              int64_t length);
   int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context);
   int32_t OnHostMsgFlush(ppapi::host::HostMessageContext* context);
+  // Private API.
+  int32_t OnHostMsgRequestOSFileHandle(
+      ppapi::host::HostMessageContext* context);
   // Trusted API.
   int32_t OnHostMsgGetOSFileDescriptor(
       ppapi::host::HostMessageContext* context);
diff --git a/ppapi/proxy/file_io_resource.cc b/ppapi/proxy/file_io_resource.cc
index d01d0a9..7d98356 100644
--- a/ppapi/proxy/file_io_resource.cc
+++ b/ppapi/proxy/file_io_resource.cc
@@ -185,25 +185,11 @@ void FileIOResource::Close() {
 }
 
 int32_t FileIOResource::GetOSFileDescriptor() {
-  IPC::Message reply;
-  ResourceMessageReplyParams reply_params;
-  int32_t error = GenericSyncCall(RENDERER,
-      PpapiHostMsg_FileIO_GetOSFileDescriptor(), &reply, &reply_params);
-  if (error != PP_OK)
-    return error;
-
-  IPC::PlatformFileForTransit transit_file;
-  if (!reply_params.TakeFileHandleAtIndex(0, &transit_file))
-    return PP_ERROR_FAILED;
-  base::PlatformFile file =
-    IPC::PlatformFileForTransitToPlatformFile(transit_file);
-#if defined(OS_POSIX)
-    return file;
-#elif defined(OS_WIN)
-    return reinterpret_cast<uintptr_t>(file);
-#else
-    return -1;  // Platform not supported.
-#endif
+  int32_t file_descriptor;
+  // Only available when running in process.
+  SyncCall<PpapiPluginMsg_FileIO_GetOSFileDescriptorReply>(
+      RENDERER, PpapiHostMsg_FileIO_GetOSFileDescriptor(), &file_descriptor);
+  return file_descriptor;
 }
 
 int32_t FileIOResource::WillWrite(int64_t offset,
@@ -246,8 +232,8 @@ int32_t FileIOResource::RequestOSFileHandle(
   if (rv != PP_OK)
     return rv;
 
-  Call<PpapiPluginMsg_FileIO_GetOSFileDescriptorReply>(RENDERER,
-      PpapiHostMsg_FileIO_GetOSFileDescriptor(),
+  Call<PpapiPluginMsg_FileIO_RequestOSFileHandleReply>(RENDERER,
+      PpapiHostMsg_FileIO_RequestOSFileHandle(),
       base::Bind(&FileIOResource::OnPluginMsgRequestOSFileHandleComplete, this,
                  callback, handle));
 
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index fd32691..eb87994 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -1391,7 +1391,10 @@ IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_WillWrite,
 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_WillSetLength,
                      int64_t /* length */)
 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_GetOSFileDescriptor)
-IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GetOSFileDescriptorReply)
+IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileIO_GetOSFileDescriptorReply,
+                     int32_t /* file descriptor */)
+IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle)
+IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply)
 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply)
 
 // Flash device ID.
