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

Side by Side Diff: mojo/edk/system/endpoint_relayer.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/endpoint_relayer.h ('k') | mojo/edk/system/endpoint_relayer_unittest.cc » ('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/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::RefPtr;
14
13 namespace mojo { 15 namespace mojo {
14 namespace system { 16 namespace system {
15 17
16 // static 18 // static
17 unsigned EndpointRelayer::GetPeerPort(unsigned port) { 19 unsigned EndpointRelayer::GetPeerPort(unsigned port) {
18 DCHECK(port == 0 || port == 1); 20 DCHECK(port == 0 || port == 1);
19 return port ^ 1; 21 return port ^ 1;
20 } 22 }
21 23
22 void EndpointRelayer::Init(RefPtr<ChannelEndpoint>&& endpoint0, 24 void EndpointRelayer::Init(RefPtr<ChannelEndpoint>&& endpoint0,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 78
77 EndpointRelayer::EndpointRelayer() {} 79 EndpointRelayer::EndpointRelayer() {}
78 80
79 EndpointRelayer::~EndpointRelayer() { 81 EndpointRelayer::~EndpointRelayer() {
80 DCHECK(!endpoints_[0]); 82 DCHECK(!endpoints_[0]);
81 DCHECK(!endpoints_[1]); 83 DCHECK(!endpoints_[1]);
82 } 84 }
83 85
84 } // namespace system 86 } // namespace system
85 } // namespace mojo 87 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/endpoint_relayer.h ('k') | mojo/edk/system/endpoint_relayer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698