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/channel_endpoint.h" | 5 #include "mojo/edk/system/channel_endpoint.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
11 #include "mojo/edk/system/channel.h" | 11 #include "mojo/edk/system/channel.h" |
12 #include "mojo/edk/system/channel_endpoint_client.h" | 12 #include "mojo/edk/system/channel_endpoint_client.h" |
13 #include "mojo/public/cpp/system/macros.h" | 13 #include "mojo/public/cpp/system/macros.h" |
14 | 14 |
| 15 using mojo::util::MutexLocker; |
15 using mojo::util::RefPtr; | 16 using mojo::util::RefPtr; |
16 | 17 |
17 namespace mojo { | 18 namespace mojo { |
18 namespace system { | 19 namespace system { |
19 | 20 |
20 bool ChannelEndpoint::EnqueueMessage( | 21 bool ChannelEndpoint::EnqueueMessage( |
21 std::unique_ptr<MessageInTransit> message) { | 22 std::unique_ptr<MessageInTransit> message) { |
22 DCHECK(message); | 23 DCHECK(message); |
23 | 24 |
24 MutexLocker locker(&mutex_); | 25 MutexLocker locker(&mutex_); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 DCHECK(remote_id_.is_valid()); | 222 DCHECK(remote_id_.is_valid()); |
222 | 223 |
223 state_ = State::DEAD; | 224 state_ = State::DEAD; |
224 channel_ = nullptr; | 225 channel_ = nullptr; |
225 local_id_ = ChannelEndpointId(); | 226 local_id_ = ChannelEndpointId(); |
226 remote_id_ = ChannelEndpointId(); | 227 remote_id_ = ChannelEndpointId(); |
227 } | 228 } |
228 | 229 |
229 } // namespace system | 230 } // namespace system |
230 } // namespace mojo | 231 } // namespace mojo |
OLD | NEW |