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

Side by Side Diff: remoting/host/ipc_util.h

Issue 1903663004: IPC: Fix attachment brokering race condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (scoped_ptr->std::unique_ptr) Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/ipc_util_posix.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 REMOTING_HOST_IPC_UTIL_H_ 5 #ifndef REMOTING_HOST_IPC_UTIL_H_
6 #define REMOTING_HOST_IPC_UTIL_H_ 6 #define REMOTING_HOST_IPC_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 class Listener; 27 class Listener;
28 } // namespace IPC 28 } // namespace IPC
29 29
30 namespace remoting { 30 namespace remoting {
31 31
32 // Creates an already connected IPC channel. The server end of the channel 32 // Creates an already connected IPC channel. The server end of the channel
33 // is wrapped into a channel proxy that will invoke methods of |listener| 33 // is wrapped into a channel proxy that will invoke methods of |listener|
34 // on the caller's thread while using |io_task_runner| to send and receive 34 // on the caller's thread while using |io_task_runner| to send and receive
35 // messages in the background. The client end is returned as a pipe handle 35 // messages in the background. The client end is returned as a pipe handle
36 // (inheritable on Windows). 36 // (inheritable on Windows).
37 // The channel is registered with the global AttachmentBroker.
37 bool CreateConnectedIpcChannel( 38 bool CreateConnectedIpcChannel(
38 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 39 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
39 IPC::Listener* listener, 40 IPC::Listener* listener,
40 base::File* client_out, 41 base::File* client_out,
41 std::unique_ptr<IPC::ChannelProxy>* server_out); 42 std::unique_ptr<IPC::ChannelProxy>* server_out);
42 43
43 #if defined(OS_WIN) 44 #if defined(OS_WIN)
44 45
45 // Creates the server end of the IPC channel and applies the security 46 // Creates the server end of the IPC channel and applies the security
46 // descriptor |pipe_security_descriptor| to it. 47 // descriptor |pipe_security_descriptor| to it.
47 bool CreateIpcChannel( 48 bool CreateIpcChannel(
48 const std::string& channel_name, 49 const std::string& channel_name,
49 const std::string& pipe_security_descriptor, 50 const std::string& pipe_security_descriptor,
50 base::win::ScopedHandle* pipe_out); 51 base::win::ScopedHandle* pipe_out);
51 52
52 #endif // defined(OS_WIN) 53 #endif // defined(OS_WIN)
53 54
54 } // namespace remoting 55 } // namespace remoting
55 56
56 #endif // REMOTING_HOST_IPC_UTIL_H_ 57 #endif // REMOTING_HOST_IPC_UTIL_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/ipc_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698