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

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

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops 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_manager.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::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
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
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_endpoint.h ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698