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

Side by Side Diff: util/mach/notify_server.cc

Issue 1414413006: mac: Add NotifyServer::DefaultInterface, a default no-op implementation (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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 | « util/mach/notify_server.h ('k') | no next file » | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const __Request__mach_notify_dead_name_t* in_request) { 98 const __Request__mach_notify_dead_name_t* in_request) {
99 using Request = __Request__mach_notify_dead_name_t; 99 using Request = __Request__mach_notify_dead_name_t;
100 return __MIG_check__Request__mach_notify_dead_name_t( 100 return __MIG_check__Request__mach_notify_dead_name_t(
101 const_cast<Request*>(in_request)); 101 const_cast<Request*>(in_request));
102 } 102 }
103 103
104 } // namespace 104 } // namespace
105 105
106 namespace crashpad { 106 namespace crashpad {
107 107
108 kern_return_t NotifyServer::DefaultInterface::DoMachNotifyPortDeleted(
109 notify_port_t notify,
110 mach_port_name_t name,
111 const mach_msg_trailer_t* trailer) {
112 return MIG_BAD_ID;
113 }
114
115 kern_return_t NotifyServer::DefaultInterface::DoMachNotifyPortDestroyed(
116 notify_port_t notify,
117 mach_port_t rights,
118 const mach_msg_trailer_t* trailer,
119 bool* destroy_request) {
120 *destroy_request = true;
121 return MIG_BAD_ID;
122 }
123
124 kern_return_t NotifyServer::DefaultInterface::DoMachNotifyNoSenders(
125 notify_port_t notify,
126 mach_port_mscount_t mscount,
127 const mach_msg_trailer_t* trailer) {
128 return MIG_BAD_ID;
129 }
130
131 kern_return_t NotifyServer::DefaultInterface::DoMachNotifySendOnce(
132 notify_port_t notify,
133 const mach_msg_trailer_t* trailer) {
134 return MIG_BAD_ID;
135 }
136
137 kern_return_t NotifyServer::DefaultInterface::DoMachNotifyDeadName(
138 notify_port_t notify,
139 mach_port_name_t name,
140 const mach_msg_trailer_t* trailer) {
141 return MIG_BAD_ID;
142 }
143
108 NotifyServer::NotifyServer(NotifyServer::Interface* interface) 144 NotifyServer::NotifyServer(NotifyServer::Interface* interface)
109 : MachMessageServer::Interface(), 145 : MachMessageServer::Interface(),
110 interface_(interface) { 146 interface_(interface) {
111 } 147 }
112 148
113 bool NotifyServer::MachMessageServerFunction( 149 bool NotifyServer::MachMessageServerFunction(
114 const mach_msg_header_t* in_header, 150 const mach_msg_header_t* in_header,
115 mach_msg_header_t* out_header, 151 mach_msg_header_t* out_header,
116 bool* destroy_complex_request) { 152 bool* destroy_complex_request) {
117 PrepareMIGReplyFromRequest(in_header, out_header); 153 PrepareMIGReplyFromRequest(in_header, out_header);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 272
237 mach_msg_size_t NotifyServer::MachMessageServerRequestSize() { 273 mach_msg_size_t NotifyServer::MachMessageServerRequestSize() {
238 return sizeof(__RequestUnion__do_notify_subsystem); 274 return sizeof(__RequestUnion__do_notify_subsystem);
239 } 275 }
240 276
241 mach_msg_size_t NotifyServer::MachMessageServerReplySize() { 277 mach_msg_size_t NotifyServer::MachMessageServerReplySize() {
242 return sizeof(__ReplyUnion__do_notify_subsystem); 278 return sizeof(__ReplyUnion__do_notify_subsystem);
243 } 279 }
244 280
245 } // namespace crashpad 281 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/notify_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698