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

Side by Side Diff: mojo/edk/system/channel_endpoint.cc

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 | « mojo/edk/system/channel_endpoint.h ('k') | mojo/edk/system/channel_endpoint_client.h » ('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 "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::RefPtr;
16
15 namespace mojo { 17 namespace mojo {
16 namespace system { 18 namespace system {
17 19
18 bool ChannelEndpoint::EnqueueMessage( 20 bool ChannelEndpoint::EnqueueMessage(
19 std::unique_ptr<MessageInTransit> message) { 21 std::unique_ptr<MessageInTransit> message) {
20 DCHECK(message); 22 DCHECK(message);
21 23
22 MutexLocker locker(&mutex_); 24 MutexLocker locker(&mutex_);
23 25
24 switch (state_) { 26 switch (state_) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 DCHECK(remote_id_.is_valid()); 221 DCHECK(remote_id_.is_valid());
220 222
221 state_ = State::DEAD; 223 state_ = State::DEAD;
222 channel_ = nullptr; 224 channel_ = nullptr;
223 local_id_ = ChannelEndpointId(); 225 local_id_ = ChannelEndpointId();
224 remote_id_ = ChannelEndpointId(); 226 remote_id_ = ChannelEndpointId();
225 } 227 }
226 228
227 } // namespace system 229 } // namespace system
228 } // namespace mojo 230 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_endpoint.h ('k') | mojo/edk/system/channel_endpoint_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698