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

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

Issue 307173002: Remove PlatformFile from components/nacl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update NexeFdCallback definition Created 6 years, 7 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/pnacl_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 a421061dcb53e7caf92cdbda3506dccbfda45b2d..a71f419358b74d586fa80c269b809f6973e2bd05 100644
--- a/components/nacl/browser/nacl_host_message_filter.cc
+++ b/components/nacl/browser/nacl_host_message_filter.cc
@@ -132,14 +132,16 @@ void NaClHostMessageFilter::OnNaClCreateTemporaryFile(
void NaClHostMessageFilter::AsyncReturnTemporaryFile(
int pp_instance,
- base::PlatformFile fd,
+ const base::File& file,
bool is_hit) {
- Send(new NaClViewMsg_NexeTempFileReply(
- pp_instance,
- is_hit,
- // Don't close our copy of the handle, because PnaclHost will use it
- // when the translation finishes.
- IPC::GetFileHandleForProcess(fd, PeerHandle(), false)));
+ IPC::PlatformFileForTransit fd = IPC::InvalidPlatformFileForTransit();
+ if (file.IsValid()) {
+ // Don't close our copy of the handle, because PnaclHost will use it
+ // when the translation finishes.
+ fd = IPC::GetFileHandleForProcess(file.GetPlatformFile(), PeerHandle(),
+ false);
+ }
+ Send(new NaClViewMsg_NexeTempFileReply(pp_instance, is_hit, fd));
}
void NaClHostMessageFilter::OnNaClGetNumProcessors(int* num_processors) {
« no previous file with comments | « components/nacl/browser/nacl_host_message_filter.h ('k') | components/nacl/browser/pnacl_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698