| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "mojo/public/cpp/bindings/interface_ptr_info.h" |
| 6 |
| 7 namespace mojo { |
| 8 |
| 9 InterfacePtrInfoBase::InterfacePtrInfoBase() : version_(0u) {} |
| 10 |
| 11 InterfacePtrInfoBase::InterfacePtrInfoBase(ScopedMessagePipeHandle handle, |
| 12 uint32_t version) |
| 13 : handle_(std::move(handle)), version_(version) {} |
| 14 |
| 15 InterfacePtrInfoBase::InterfacePtrInfoBase(InterfacePtrInfoBase&& other) |
| 16 : handle_(std::move(other.handle_)), version_(other.version_) { |
| 17 other.version_ = 0u; |
| 18 } |
| 19 |
| 20 InterfacePtrInfoBase::~InterfacePtrInfoBase() {} |
| 21 |
| 22 InterfacePtrInfoBase& InterfacePtrInfoBase::operator=( |
| 23 InterfacePtrInfoBase&& other) { |
| 24 if (this != &other) { |
| 25 handle_ = std::move(other.handle_); |
| 26 version_ = other.version_; |
| 27 other.version_ = 0u; |
| 28 } |
| 29 |
| 30 return *this; |
| 31 } |
| 32 |
| 33 } // namespace mojo |
| OLD | NEW |