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

Side by Side Diff: ipc/ipc_channel_nacl.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_win.cc ('k') | ipc/ipc_channel_nacl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_IPC_CHANNEL_NACL_H_ 5 #ifndef IPC_IPC_CHANNEL_NACL_H_
6 #define IPC_IPC_CHANNEL_NACL_H_ 6 #define IPC_IPC_CHANNEL_NACL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void CallOnChannelConnected(); 62 void CallOnChannelConnected();
63 63
64 // ChannelReader implementation. 64 // ChannelReader implementation.
65 ReadState ReadData(char* buffer, 65 ReadState ReadData(char* buffer,
66 int buffer_len, 66 int buffer_len,
67 int* bytes_read) override; 67 int* bytes_read) override;
68 bool ShouldDispatchInputMessage(Message* msg) override; 68 bool ShouldDispatchInputMessage(Message* msg) override;
69 bool GetNonBrokeredAttachments(Message* msg) override; 69 bool GetNonBrokeredAttachments(Message* msg) override;
70 bool DidEmptyInputBuffers() override; 70 bool DidEmptyInputBuffers() override;
71 void HandleInternalMessage(const Message& msg) override; 71 void HandleInternalMessage(const Message& msg) override;
72 base::ProcessId GetSenderPID() override;
72 73
73 Mode mode_; 74 Mode mode_;
74 bool waiting_connect_; 75 bool waiting_connect_;
75 76
76 // The pipe used for communication. 77 // The pipe used for communication.
77 int pipe_; 78 int pipe_;
78 79
79 // The "name" of our pipe. On Windows this is the global identifier for 80 // The "name" of our pipe. On Windows this is the global identifier for
80 // the pipe. On POSIX it's used as a key in a local map of file descriptors. 81 // the pipe. On POSIX it's used as a key in a local map of file descriptors.
81 // For NaCl, we don't actually support looking up file descriptors by name, 82 // For NaCl, we don't actually support looking up file descriptors by name,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 // |broker_| must outlive this instance. 122 // |broker_| must outlive this instance.
122 AttachmentBroker* broker_; 123 AttachmentBroker* broker_;
123 124
124 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelNacl); 125 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelNacl);
125 }; 126 };
126 127
127 } // namespace IPC 128 } // namespace IPC
128 129
129 #endif // IPC_IPC_CHANNEL_NACL_H_ 130 #endif // IPC_IPC_CHANNEL_NACL_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_win.cc ('k') | ipc/ipc_channel_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698