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

Side by Side Diff: sandbox/mac/xpc_message_server.cc

Issue 1853713004: mac: Remove some 10.6-SDK-only sandbox code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 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 | « sandbox/mac/xpc.cc ('k') | sandbox/mac/xpc_message_server_unittest.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 Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "sandbox/mac/xpc_message_server.h" 5 #include "sandbox/mac/xpc_message_server.h"
6 6
7 #include <bsm/libbsm.h> 7 #include <bsm/libbsm.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/mac/mach_logging.h" 11 #include "base/mac/mach_logging.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "sandbox/mac/xpc.h" 13 #include "sandbox/mac/xpc.h"
14 14
15 namespace sandbox { 15 namespace sandbox {
16 16
17 XPCMessageServer::XPCMessageServer(MessageDemuxer* demuxer, 17 XPCMessageServer::XPCMessageServer(MessageDemuxer* demuxer,
18 mach_port_t server_receive_right) 18 mach_port_t server_receive_right)
19 : demuxer_(demuxer), 19 : demuxer_(demuxer),
20 server_port_(server_receive_right), 20 server_port_(server_receive_right),
21 reply_message_(NULL) { 21 reply_message_(NULL) {}
22 CHECK(InitializeXPC());
23 }
24 22
25 XPCMessageServer::~XPCMessageServer() { 23 XPCMessageServer::~XPCMessageServer() {
26 } 24 }
27 25
28 bool XPCMessageServer::Initialize() { 26 bool XPCMessageServer::Initialize() {
29 // Allocate a port for use as a new server port if one was not passed to the 27 // Allocate a port for use as a new server port if one was not passed to the
30 // constructor. 28 // constructor.
31 if (!server_port_.is_valid()) { 29 if (!server_port_.is_valid()) {
32 mach_port_t port; 30 mach_port_t port;
33 kern_return_t kr; 31 kern_return_t kr;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 demuxer_->DemuxMessage(request); 115 demuxer_->DemuxMessage(request);
118 116
119 xpc_release(request.xpc); 117 xpc_release(request.xpc);
120 if (reply_message_) { 118 if (reply_message_) {
121 xpc_release(reply_message_); 119 xpc_release(reply_message_);
122 reply_message_ = NULL; 120 reply_message_ = NULL;
123 } 121 }
124 } 122 }
125 123
126 } // namespace sandbox 124 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/mac/xpc.cc ('k') | sandbox/mac/xpc_message_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698