Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: components/nacl/browser/nacl_host_message_filter.cc

Issue 165663002: Remove some PlatformFile uses from NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add empty line Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/browser/nacl_host_message_filter.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « components/nacl/browser/nacl_host_message_filter.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698