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

Side by Side Diff: ipc/attachment_broker_privileged_win.h

Issue 1493413004: ipc: Allow attachment brokering for shared memory handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp1
Patch Set: Fix more tests. Created 4 years, 11 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 | « ipc/BUILD.gn ('k') | ipc/attachment_broker_privileged_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_ 5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_ 6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ipc/attachment_broker_privileged.h" 9 #include "ipc/attachment_broker_privileged.h"
10 #include "ipc/handle_attachment_win.h" 10 #include "ipc/handle_attachment_win.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // IPC::Listener overrides. 28 // IPC::Listener overrides.
29 bool OnMessageReceived(const Message& message) override; 29 bool OnMessageReceived(const Message& message) override;
30 30
31 private: 31 private:
32 using HandleWireFormat = internal::HandleAttachmentWin::WireFormat; 32 using HandleWireFormat = internal::HandleAttachmentWin::WireFormat;
33 // IPC message handlers. 33 // IPC message handlers.
34 void OnDuplicateWinHandle(const Message& message); 34 void OnDuplicateWinHandle(const Message& message);
35 35
36 // Duplicates |wire_Format| from |source_process| into its destination 36 // Duplicates |wire_Format| from |source_process| into its destination
37 // process. 37 // process. Closes the original HANDLE.
38 HandleWireFormat DuplicateWinHandle(const HandleWireFormat& wire_format, 38 HandleWireFormat DuplicateWinHandle(const HandleWireFormat& wire_format,
39 base::ProcessId source_process); 39 base::ProcessId source_process);
40 40
41 // Copies an existing |wire_format|, but substitutes in a different handle. 41 // Copies an existing |wire_format|, but substitutes in a different handle.
42 HandleWireFormat CopyWireFormat(const HandleWireFormat& wire_format, 42 HandleWireFormat CopyWireFormat(const HandleWireFormat& wire_format,
43 int handle); 43 int handle);
44 44
45 // If the HANDLE's destination is this process, queue it and notify the 45 // If the HANDLE's destination is this process, queue it and notify the
46 // observers. Otherwise, send it in an IPC to its destination. 46 // observers. Otherwise, send it in an IPC to its destination.
47 void RouteDuplicatedHandle(const HandleWireFormat& wire_format); 47 void RouteDuplicatedHandle(const HandleWireFormat& wire_format);
48 48
49 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedWin); 49 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedWin);
50 }; 50 };
51 51
52 } // namespace IPC 52 } // namespace IPC
53 53
54 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_ 54 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
OLDNEW
« no previous file with comments | « ipc/BUILD.gn ('k') | ipc/attachment_broker_privileged_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698