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

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

Issue 557793002: Enhance the MachMessageServer test to cover large messages (MACH_RCV_LARGE) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 3 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 | « no previous file | util/mach/mach_message_server_test.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 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 //! \param[in] interface The MachMessageServerInterface that is responsible 114 //! \param[in] interface The MachMessageServerInterface that is responsible
115 //! for handling the message. Interface::MachMessageServerRequestSize() is 115 //! for handling the message. Interface::MachMessageServerRequestSize() is
116 //! used as the receive size for the request message, and 116 //! used as the receive size for the request message, and
117 //! Interface::MachMessageServerReplySize() is used as the 117 //! Interface::MachMessageServerReplySize() is used as the
118 //! maximum size of the reply message. If \a options contains 118 //! maximum size of the reply message. If \a options contains
119 //! `MACH_RCV_LARGE`, this function will retry a receive operation that 119 //! `MACH_RCV_LARGE`, this function will retry a receive operation that
120 //! returns `MACH_RCV_TOO_LARGE` with an appropriately-sized buffer. 120 //! returns `MACH_RCV_TOO_LARGE` with an appropriately-sized buffer.
121 //! MachMessageServerInterface::MachMessageServerFunction() is called to 121 //! MachMessageServerInterface::MachMessageServerFunction() is called to
122 //! handle the request and populate the reply. 122 //! handle the request and populate the reply.
123 //! \param[in] receive_port The port on which to receive the request message. 123 //! \param[in] receive_port The port on which to receive the request message.
124 //! \param[in] options Options suitable for mach_msg. 124 //! \param[in] options Options suitable for mach_msg. For the defaults, use
125 //! `MACH_MSG_OPTION_NONE`.
125 //! \param[in] persistent Chooses between one-shot and persistent operation. 126 //! \param[in] persistent Chooses between one-shot and persistent operation.
126 //! \param[in] nonblocking Chooses between blocking and nonblocking operation. 127 //! \param[in] nonblocking Chooses between blocking and nonblocking operation.
127 //! \param[in] timeout_ms When \a nonblocking is `false`, the the maximum 128 //! \param[in] timeout_ms When \a nonblocking is `false`, the the maximum
128 //! duration that this entire function will run, in milliseconds, or 129 //! duration that this entire function will run, in milliseconds, or
129 //! `MACH_MSG_TIMEOUT_NONE` to specify no timeout (infinite waiting). When 130 //! `MACH_MSG_TIMEOUT_NONE` to specify no timeout (infinite waiting). When
130 //! \a nonblocking is `true`, this parameter has no effect. When \a 131 //! \a nonblocking is `true`, this parameter has no effect. When \a
131 //! persistent is `true`, the timeout applies to the overall duration of 132 //! persistent is `true`, the timeout applies to the overall duration of
132 //! this function, not to any individual `mach_msg()` call. 133 //! this function, not to any individual `mach_msg()` call.
133 //! 134 //!
134 //! \return On success, `KERN_SUCCESS` (when \a persistent is `false`) or 135 //! \return On success, `KERN_SUCCESS` (when \a persistent is `false`) or
(...skipping 10 matching lines...) Expand all
145 Nonblocking nonblocking, 146 Nonblocking nonblocking,
146 mach_msg_timeout_t timeout_ms); 147 mach_msg_timeout_t timeout_ms);
147 148
148 private: 149 private:
149 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer); 150 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer);
150 }; 151 };
151 152
152 } // namespace crashpad 153 } // namespace crashpad
153 154
154 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ 155 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_
OLDNEW
« no previous file with comments | « no previous file | util/mach/mach_message_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698