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

Unified Diff: mojo/edk/embedder/named_platform_handle_utils.h

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
Index: mojo/edk/embedder/named_platform_handle_utils.h
diff --git a/mojo/edk/embedder/named_platform_handle_utils.h b/mojo/edk/embedder/named_platform_handle_utils.h
index 6b856bb52f03c3ff0ac8c30468a9724704810045..f13e1765fabb6d3d417436a397a0dbcceb5f30e8 100644
--- a/mojo/edk/embedder/named_platform_handle_utils.h
+++ b/mojo/edk/embedder/named_platform_handle_utils.h
@@ -9,21 +9,37 @@
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/system_impl_export.h"
+#if defined(OS_WIN)
+#include "base/strings/string16.h"
+#endif
+
namespace mojo {
namespace edk {
struct NamedPlatformHandle;
+struct CreateServerHandleOptions {
+#if defined(OS_WIN)
+ // If true, creating a server handle will fail if another pipe with the same
+ // name exists.
+ bool enforce_uniqueness = true;
+
+ // If non-empty, a security descriptor to use when creating the pipe. If
+ // empty, a default security descriptor will be used. See
+ // kDefaultSecurityDescriptor in named_platform_handle_utils_win.cc.
+ base::string16 security_descriptor;
+#endif
+};
+
// Creates a client platform handle from |handle|. This may block until |handle|
// is ready to receive connections.
MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle
CreateClientHandle(const NamedPlatformHandle& handle);
-// Creates a server platform handle from |handle|. On Windows, if
-// |enforce_uniqueness| is true, this will fail if another pipe with the same
-// name exists. On other platforms, |enforce_uniqueness| must be false.
+// Creates a server platform handle from |handle|.
MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle
-CreateServerHandle(const NamedPlatformHandle& handle, bool enforce_uniqueness);
+CreateServerHandle(const NamedPlatformHandle& handle,
+ const CreateServerHandleOptions& options = {});
} // namespace edk
} // namespace mojo
« no previous file with comments | « mojo/edk/embedder/named_platform_channel_pair_win.cc ('k') | mojo/edk/embedder/named_platform_handle_utils_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698