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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.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 | « components/nacl/renderer/plugin/pnacl_translate_thread.cc ('k') | content/child/mojo/mojo_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index eb325e4640b5fc8aabee9cd2dd59b93806c2aa1a..024efab13f8c704825f2b46779c77a92112b6170 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -22,6 +22,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/process/process_handle.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -471,10 +472,8 @@ void PPBNaClPrivate::LaunchSelLdr(
if (nexe_file_info->handle != PP_kInvalidFileHandle)
nexe_for_transit = base::FileDescriptor(nexe_file_info->handle, true);
#elif defined(OS_WIN)
- // Duplicate the handle on the browser side instead of the renderer.
- // This is because BrokerGetFileForProcess isn't part of content/public, and
- // it's simpler to do the duplication in the browser anyway.
- nexe_for_transit = nexe_file_info->handle;
+ nexe_for_transit = IPC::PlatformFileForTransit(nexe_file_info->handle,
+ base::GetCurrentProcId());
#else
# error Unsupported target platform.
#endif
« no previous file with comments | « components/nacl/renderer/plugin/pnacl_translate_thread.cc ('k') | content/child/mojo/mojo_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698