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

Unified Diff: content/common/sandbox_util.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 | « content/child/mojo/mojo_application.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_util.cc
diff --git a/content/common/sandbox_util.cc b/content/common/sandbox_util.cc
index 4b1dcef4a9124b3b8a905ad6301886ae55a6d9a3..eea8486ca1d52506265812eda4eb5ddec4841cc4 100644
--- a/content/common/sandbox_util.cc
+++ b/content/common/sandbox_util.cc
@@ -22,8 +22,11 @@ IPC::PlatformFileForTransit BrokerGetFileHandleForProcess(
DWORD options = DUPLICATE_SAME_ACCESS;
if (should_close_source)
options |= DUPLICATE_CLOSE_SOURCE;
- if (!content::BrokerDuplicateHandle(handle, target_process_id, &out_handle,
- 0, options)) {
+ HANDLE raw_handle = INVALID_HANDLE_VALUE;
+ if (content::BrokerDuplicateHandle(handle, target_process_id, &raw_handle, 0,
+ options)) {
+ out_handle = IPC::PlatformFileForTransit(raw_handle, target_process_id);
+ } else {
out_handle = IPC::InvalidPlatformFileForTransit();
}
#elif defined(OS_POSIX)
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698