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

Unified Diff: util/mach/mach_message_util.cc

Issue 772133004: Move mach_message_util.* to mach_message.* (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/mach/mach_message_util.h ('k') | util/mach/mach_message_util_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_message_util.cc
diff --git a/util/mach/mach_message_util.cc b/util/mach/mach_message_util.cc
deleted file mode 100644
index a6e61d1ed4fc012b13f6f35c9d7d68e6147ebf70..0000000000000000000000000000000000000000
--- a/util/mach/mach_message_util.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Crashpad Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "util/mach/mach_message_util.h"
-
-namespace crashpad {
-
-void PrepareMIGReplyFromRequest(const mach_msg_header_t* in_header,
- mach_msg_header_t* out_header) {
- out_header->msgh_bits =
- MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(in_header->msgh_bits), 0);
- out_header->msgh_remote_port = in_header->msgh_remote_port;
- out_header->msgh_size = sizeof(mig_reply_error_t);
- out_header->msgh_local_port = MACH_PORT_NULL;
- out_header->msgh_id = in_header->msgh_id + 100;
- reinterpret_cast<mig_reply_error_t*>(out_header)->NDR = NDR_record;
-
- // MIG-generated dispatch routines don’t do this, but they should.
- out_header->msgh_reserved = 0;
-}
-
-void SetMIGReplyError(mach_msg_header_t* out_header, kern_return_t error) {
- reinterpret_cast<mig_reply_error_t*>(out_header)->RetCode = error;
-}
-
-const mach_msg_trailer_t* MachMessageTrailerFromHeader(
- const mach_msg_header_t* header) {
- vm_address_t header_address = reinterpret_cast<vm_address_t>(header);
- vm_address_t trailer_address = header_address + round_msg(header->msgh_size);
- return reinterpret_cast<const mach_msg_trailer_t*>(trailer_address);
-}
-
-} // namespace crashpad
« no previous file with comments | « util/mach/mach_message_util.h ('k') | util/mach/mach_message_util_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698