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

Unified Diff: mojo/edk/embedder/named_platform_channel_pair_win.cc

Issue 2444793002: Allow custom security descriptors when creating named pipes on Windows. (Closed)
Patch Set: Created 4 years, 2 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 | « mojo/edk/embedder/named_platform_channel_pair.h ('k') | mojo/edk/embedder/named_platform_handle_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/named_platform_channel_pair_win.cc
diff --git a/mojo/edk/embedder/named_platform_channel_pair_win.cc b/mojo/edk/embedder/named_platform_channel_pair_win.cc
index 39c16b9b1dc2b60668a69b06a867b642e8584e89..96589ff5cfb1fbc5b0f89bd8147b6ea0a58c0d40 100644
--- a/mojo/edk/embedder/named_platform_channel_pair_win.cc
+++ b/mojo/edk/embedder/named_platform_channel_pair_win.cc
@@ -35,9 +35,13 @@ std::wstring GeneratePipeName() {
} // namespace
-NamedPlatformChannelPair::NamedPlatformChannelPair()
+NamedPlatformChannelPair::NamedPlatformChannelPair(
+ const NamedPlatformChannelPair::Options& options)
: pipe_handle_(GeneratePipeName()) {
- server_handle_ = CreateServerHandle(pipe_handle_, true);
+ CreateServerHandleOptions server_handle_options;
+ server_handle_options.security_descriptor = options.security_descriptor;
+ server_handle_options.enforce_uniqueness = true;
+ server_handle_ = CreateServerHandle(pipe_handle_, server_handle_options);
PCHECK(server_handle_.is_valid());
}
« no previous file with comments | « mojo/edk/embedder/named_platform_channel_pair.h ('k') | mojo/edk/embedder/named_platform_handle_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698