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 "mojo/edk/system/endpoint_relayer.h" | 5 #include "mojo/edk/system/endpoint_relayer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/edk/system/channel_endpoint.h" | 10 #include "mojo/edk/system/channel_endpoint.h" |
11 #include "mojo/edk/system/message_in_transit.h" | 11 #include "mojo/edk/system/message_in_transit.h" |
12 | 12 |
| 13 using mojo::util::MutexLocker; |
13 using mojo::util::RefPtr; | 14 using mojo::util::RefPtr; |
14 | 15 |
15 namespace mojo { | 16 namespace mojo { |
16 namespace system { | 17 namespace system { |
17 | 18 |
18 // static | 19 // static |
19 unsigned EndpointRelayer::GetPeerPort(unsigned port) { | 20 unsigned EndpointRelayer::GetPeerPort(unsigned port) { |
20 DCHECK(port == 0 || port == 1); | 21 DCHECK(port == 0 || port == 1); |
21 return port ^ 1; | 22 return port ^ 1; |
22 } | 23 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 79 |
79 EndpointRelayer::EndpointRelayer() {} | 80 EndpointRelayer::EndpointRelayer() {} |
80 | 81 |
81 EndpointRelayer::~EndpointRelayer() { | 82 EndpointRelayer::~EndpointRelayer() { |
82 DCHECK(!endpoints_[0]); | 83 DCHECK(!endpoints_[0]); |
83 DCHECK(!endpoints_[1]); | 84 DCHECK(!endpoints_[1]); |
84 } | 85 } |
85 | 86 |
86 } // namespace system | 87 } // namespace system |
87 } // namespace mojo | 88 } // namespace mojo |
OLD | NEW |