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

Side by Side Diff: mojo/edk/embedder/named_platform_channel_pair.h

Issue 2444793002: Allow custom security descriptors when creating named pipes on Windows. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/service/service_process.cc ('k') | mojo/edk/embedder/named_platform_channel_pair_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_ 5 #ifndef MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_
6 #define MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_ 6 #define MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 namespace mojo { 21 namespace mojo {
22 namespace edk { 22 namespace edk {
23 23
24 // This is used to create a named bidirectional pipe to connect new child 24 // This is used to create a named bidirectional pipe to connect new child
25 // processes. The resulting server handle should be passed to the EDK, and the 25 // processes. The resulting server handle should be passed to the EDK, and the
26 // child end passed as a pipe name on the command line to the child process. The 26 // child end passed as a pipe name on the command line to the child process. The
27 // child process can then retrieve the pipe name from the command line and 27 // child process can then retrieve the pipe name from the command line and
28 // resolve it into a client handle. 28 // resolve it into a client handle.
29 class MOJO_SYSTEM_IMPL_EXPORT NamedPlatformChannelPair { 29 class MOJO_SYSTEM_IMPL_EXPORT NamedPlatformChannelPair {
30 public: 30 public:
31 NamedPlatformChannelPair(); 31 struct Options {
32 #if defined(OS_WIN)
33 // If non-empty, a security descriptor to use when creating the pipe. If
34 // empty, a default security descriptor will be used. See
35 // kDefaultSecurityDescriptor in named_platform_handle_utils_win.cc.
36 base::string16 security_descriptor;
37 #endif
38 };
39
40 NamedPlatformChannelPair(const Options& options = {});
32 ~NamedPlatformChannelPair(); 41 ~NamedPlatformChannelPair();
33 42
34 // Note: It is NOT acceptable to use this handle as a generic pipe channel. It 43 // Note: It is NOT acceptable to use this handle as a generic pipe channel. It
35 // MUST be passed to mojo::edk::ChildProcessLaunched() only. 44 // MUST be passed to mojo::edk::ChildProcessLaunched() only.
36 ScopedPlatformHandle PassServerHandle(); 45 ScopedPlatformHandle PassServerHandle();
37 46
38 // To be called in the child process, after the parent process called 47 // To be called in the child process, after the parent process called
39 // |PrepareToPassClientHandleToChildProcess()| and launched the child (using 48 // |PrepareToPassClientHandleToChildProcess()| and launched the child (using
40 // the provided data), to create a client handle connected to the server 49 // the provided data), to create a client handle connected to the server
41 // handle (in the parent process). 50 // handle (in the parent process).
(...skipping 11 matching lines...) Expand all
53 NamedPlatformHandle pipe_handle_; 62 NamedPlatformHandle pipe_handle_;
54 ScopedPlatformHandle server_handle_; 63 ScopedPlatformHandle server_handle_;
55 64
56 DISALLOW_COPY_AND_ASSIGN(NamedPlatformChannelPair); 65 DISALLOW_COPY_AND_ASSIGN(NamedPlatformChannelPair);
57 }; 66 };
58 67
59 } // namespace edk 68 } // namespace edk
60 } // namespace mojo 69 } // namespace mojo
61 70
62 #endif // MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_ 71 #endif // MOJO_EDK_EMBEDDER_NAMED_PLATFORM_CHANNEL_PAIR_H_
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | mojo/edk/embedder/named_platform_channel_pair_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698