OLD | NEW |
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/dispatch_source_mach.h" | 5 #include "base/mac/dispatch_source_mach.h" |
6 | 6 |
7 namespace sandbox { | 7 namespace base { |
8 | 8 |
9 DispatchSourceMach::DispatchSourceMach(const char* name, | 9 DispatchSourceMach::DispatchSourceMach(const char* name, |
10 mach_port_t port, | 10 mach_port_t port, |
11 void (^event_handler)()) | 11 void (^event_handler)()) |
12 // TODO(rsesek): Specify DISPATCH_QUEUE_SERIAL, in the 10.7 SDK. NULL | 12 // TODO(rsesek): Specify DISPATCH_QUEUE_SERIAL, in the 10.7 SDK. NULL |
13 // means the same thing but is not symbolically clear. | 13 // means the same thing but is not symbolically clear. |
14 : DispatchSourceMach(dispatch_queue_create(name, NULL), | 14 : DispatchSourceMach(dispatch_queue_create(name, NULL), |
15 port, | 15 port, |
16 event_handler) { | 16 event_handler) { |
17 // Since the queue was created above in the delegated constructor, and it was | 17 // Since the queue was created above in the delegated constructor, and it was |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 dispatch_release(source_canceled_); | 52 dispatch_release(source_canceled_); |
53 source_canceled_ = NULL; | 53 source_canceled_ = NULL; |
54 } | 54 } |
55 | 55 |
56 if (queue_) { | 56 if (queue_) { |
57 dispatch_release(queue_); | 57 dispatch_release(queue_); |
58 queue_ = NULL; | 58 queue_ = NULL; |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 } // namespace sandbox | 62 } // namespace base |
OLD | NEW |