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

Side by Side Diff: util/mach/child_port_handshake.h

Issue 1421283004: Review helper for https://codereview.chromium.org/1409073013 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: unindent Created 5 years, 1 month 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 | « snapshot/win/exception_snapshot_win_test.cc ('k') | util/mach/mach_message_server.h » ('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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 //! mach_msg_type_name_t send_right_type; 115 //! mach_msg_type_name_t send_right_type;
116 //! mach_port_extract_right(mach_task_self(), 116 //! mach_port_extract_right(mach_task_self(),
117 //! receive_right.get(), 117 //! receive_right.get(),
118 //! MACH_MSG_TYPE_MAKE_SEND, 118 //! MACH_MSG_TYPE_MAKE_SEND,
119 //! &send_right, 119 //! &send_right,
120 //! &send_right_type); 120 //! &send_right_type);
121 //! base::mac::ScopedMachSendRight send_right_owner(send_right); 121 //! base::mac::ScopedMachSendRight send_right_owner(send_right);
122 //! 122 //!
123 //! // Send the receive right to the child process, retaining the send right 123 //! // Send the receive right to the child process, retaining the send right
124 //! // for use in the parent process. 124 //! // for use in the parent process.
125 //! if (child_port_handshake.RunClient(receive_right, 125 //! if (child_port_handshake.RunClient(receive_right.get(),
126 //! MACH_MSG_TYPE_MOVE_RECEIVE)) { 126 //! MACH_MSG_TYPE_MOVE_RECEIVE)) {
127 //! ignore_result(receive_right.release()); 127 //! ignore_result(receive_right.release());
128 //! } 128 //! }
129 //! \endcode 129 //! \endcode
130 //! 130 //!
131 //! Example child process, running a server that receives a receive right from 131 //! Example child process, running a server that receives a receive right from
132 //! its parent: 132 //! its parent:
133 //! \code 133 //! \code
134 //! int main(int argc, char* argv[]) { 134 //! int main(int argc, char* argv[]) {
135 //! // The parent passed server_write_fd in argv[1]. 135 //! // The parent passed server_write_fd in argv[1].
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 base::ScopedFD server_write_fd_; 318 base::ScopedFD server_write_fd_;
319 319
320 friend class test::ChildPortHandshakeTest; 320 friend class test::ChildPortHandshakeTest;
321 321
322 DISALLOW_COPY_AND_ASSIGN(ChildPortHandshake); 322 DISALLOW_COPY_AND_ASSIGN(ChildPortHandshake);
323 }; 323 };
324 324
325 } // namespace crashpad 325 } // namespace crashpad
326 326
327 #endif // CRASHPAD_UTIL_MACH_CHILD_PORT_HANDSHAKE_H_ 327 #endif // CRASHPAD_UTIL_MACH_CHILD_PORT_HANDSHAKE_H_
OLDNEW
« no previous file with comments | « snapshot/win/exception_snapshot_win_test.cc ('k') | util/mach/mach_message_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698