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

Side by Side Diff: ipc/attachment_broker_privileged_win.h

Issue 1262543003: ipc: Create an unforgeable mechanism to get the process id of the sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dchecks. Created 5 years, 4 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/attachment_broker_messages.h ('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 <vector> 8 #include <vector>
9 9
10 #include "ipc/attachment_broker.h" 10 #include "ipc/attachment_broker.h"
(...skipping 23 matching lines...) Expand all
34 // Each unprivileged process should have one IPC channel on which it 34 // Each unprivileged process should have one IPC channel on which it
35 // communicates attachment information with this privileged process. These 35 // communicates attachment information with this privileged process. These
36 // channels must be registered and deregistered with the Attachment Broker as 36 // channels must be registered and deregistered with the Attachment Broker as
37 // they are created and destroyed. 37 // they are created and destroyed.
38 void RegisterCommunicationChannel(Channel* channel); 38 void RegisterCommunicationChannel(Channel* channel);
39 void DeregisterCommunicationChannel(Channel* channel); 39 void DeregisterCommunicationChannel(Channel* channel);
40 40
41 private: 41 private:
42 using HandleWireFormat = internal::HandleAttachmentWin::WireFormat; 42 using HandleWireFormat = internal::HandleAttachmentWin::WireFormat;
43 // IPC message handlers. 43 // IPC message handlers.
44 void OnDuplicateWinHandle(const HandleWireFormat& wire_format, 44 void OnDuplicateWinHandle(const IPC::Message& message);
45 base::ProcessId source_process);
46 45
47 // Duplicates |wire_Format| from |source_process| into its destination 46 // Duplicates |wire_Format| from |source_process| into its destination
48 // process. 47 // process.
49 HandleWireFormat DuplicateWinHandle(const HandleWireFormat& wire_format, 48 HandleWireFormat DuplicateWinHandle(const HandleWireFormat& wire_format,
50 base::ProcessId source_process); 49 base::ProcessId source_process);
51 50
52 // If the HANDLE's destination is this process, queue it and notify the 51 // If the HANDLE's destination is this process, queue it and notify the
53 // observers. Otherwise, send it in an IPC to its destination. 52 // observers. Otherwise, send it in an IPC to its destination.
54 void RouteDuplicatedHandle(const HandleWireFormat& wire_format); 53 void RouteDuplicatedHandle(const HandleWireFormat& wire_format);
55 54
56 std::vector<Channel*> channels_; 55 std::vector<Channel*> channels_;
57 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedWin); 56 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedWin);
58 }; 57 };
59 58
60 } // namespace IPC 59 } // namespace IPC
61 60
62 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_ 61 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_messages.h ('k') | ipc/attachment_broker_privileged_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698