OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "base/files/scoped_platform_handle.h" |
| 6 |
| 7 namespace base { |
| 8 |
| 9 ScopedPlatformHandle::ScopedPlatformHandle() : ScopedPlatformHandle(nullptr) {} |
| 10 |
| 11 ScopedPlatformHandle::ScopedPlatformHandle(std::nullptr_t) {} |
| 12 |
| 13 ScopedPlatformHandle::ScopedPlatformHandle(ScopedPlatformHandle&& other) = |
| 14 default; |
| 15 |
| 16 ScopedPlatformHandle::ScopedPlatformHandle(HandleType handle) |
| 17 : handle_(handle) {} |
| 18 |
| 19 ScopedPlatformHandle::ScopedPlatformHandle(ScopedHandleType handle) |
| 20 : handle_(std::move(handle)) {} |
| 21 |
| 22 ScopedPlatformHandle::~ScopedPlatformHandle() {} |
| 23 |
| 24 ScopedPlatformHandle& ScopedPlatformHandle::operator=( |
| 25 ScopedPlatformHandle&& other) = default; |
| 26 |
| 27 ScopedPlatformHandle::ScopedHandleType ScopedPlatformHandle::Take() { |
| 28 return ScopedHandleType(release()); |
| 29 } |
| 30 |
| 31 } // namespace base |
OLD | NEW |