blob: 6d23215e905f1d60decf281a8644431ed22aeaec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "mojo/edk/system/channel_info.h"
#include <algorithm>
namespace mojo {
namespace system {
ChannelInfo::ChannelInfo() {
}
ChannelInfo::ChannelInfo(
scoped_refptr<Channel> channel,
scoped_refptr<base::TaskRunner> channel_thread_task_runner)
: channel(channel), channel_thread_task_runner(channel_thread_task_runner) {
}
ChannelInfo::~ChannelInfo() {
}
void ChannelInfo::Swap(ChannelInfo* other) {
// Note: Swapping avoids refcount churn.
std::swap(channel, other->channel);
std::swap(channel_thread_task_runner, other->channel_thread_task_runner);
}
} // namespace system
} // namespace mojo
|