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

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

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from mseaborn. Created 4 years, 9 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 | « no previous file | components/nacl/loader/nacl_ipc_adapter.cc » ('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 a29103fc341f1e556e4d5cc71455a69ea0f0b64d..aab275d9fb0df1c9dff3eab409a29d232e399ed7 100644
--- a/components/nacl/browser/nacl_host_message_filter.cc
+++ b/components/nacl/browser/nacl_host_message_filter.cc
@@ -255,30 +255,8 @@ void NaClHostMessageFilter::LaunchNaClContinuationOnIOThread(
launch_params.nexe_token_hi // hi
};
- base::PlatformFile nexe_file;
-#if defined(OS_WIN)
- // Duplicate the nexe file handle from the renderer process into the browser
- // process.
- if (!::DuplicateHandle(PeerHandle(),
- launch_params.nexe_file,
- base::GetCurrentProcessHandle(),
- &nexe_file,
- 0, // Unused, given DUPLICATE_SAME_ACCESS.
- FALSE,
- DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
- NaClHostMsg_LaunchNaCl::WriteReplyParams(
- reply_msg,
- NaClLaunchResult(),
- std::string("Failed to duplicate nexe file handle"));
- Send(reply_msg);
- return;
- }
-#elif defined(OS_POSIX)
- nexe_file =
+ base::PlatformFile nexe_file =
IPC::PlatformFileForTransitToPlatformFile(launch_params.nexe_file);
-#else
-#error Unsupported platform.
-#endif
NaClProcessHost* host = new NaClProcessHost(
GURL(launch_params.manifest_url),
« no previous file with comments | « no previous file | components/nacl/loader/nacl_ipc_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698