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

Unified Diff: remoting/host/win/launch_process_with_token.h

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | « remoting/host/win/host_service.cc ('k') | remoting/host/win/launch_process_with_token.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/launch_process_with_token.h
diff --git a/remoting/host/win/launch_process_with_token.h b/remoting/host/win/launch_process_with_token.h
index f72567ce57200f1d97a36a619d6cf04d64a968a9..5a2c309e698c806fff57c52eabda8b6afad1c860 100644
--- a/remoting/host/win/launch_process_with_token.h
+++ b/remoting/host/win/launch_process_with_token.h
@@ -14,12 +14,34 @@
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_handle.h"
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace IPC {
+class ChannelProxy;
+class Listener;
+} // namespace IPC
+
namespace remoting {
// Pipe name prefix used by Chrome IPC channels to convert a channel name into
// a pipe name.
extern const char kChromePipeNamePrefix[];
+// Creates an already connected IPC channel. The server end of the channel
+// is wrapped into a channel proxy that will invoke methods of |delegate|
+// on the caller's thread while using |io_task_runner| to send and receive
+// messages in the background. The client end is returned as an inheritable NT
+// handle. |pipe_security_descriptor| is applied to the underlying pipe.
+bool CreateConnectedIpcChannel(
+ const std::string& channel_name,
+ const std::string& pipe_security_descriptor,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+ IPC::Listener* delegate,
+ base::win::ScopedHandle* client_out,
+ scoped_ptr<IPC::ChannelProxy>* server_out);
+
// Creates the server end of the IPC channel and applies the security
// descriptor |pipe_security_descriptor| to it.
bool CreateIpcChannel(
@@ -31,9 +53,6 @@ bool CreateIpcChannel(
// it can be used to launch a process in that session.
bool CreateSessionToken(uint32 session_id, base::win::ScopedHandle* token_out);
-// Generates a unique IPC channel name.
-std::string GenerateIpcChannelName(void* client);
-
// Launches |binary| in the security context of the user represented by
// |user_token|. The session ID specified by the token is respected as well.
bool LaunchProcessWithToken(const FilePath& binary,
« no previous file with comments | « remoting/host/win/host_service.cc ('k') | remoting/host/win/launch_process_with_token.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698