| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ | 4 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ |
| 5 #define NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ | 5 #define NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 template <typename T, typename... Args> | 11 template <typename T, typename... Args> |
| 12 std::unique_ptr<T> QuicMakeUniqueImpl(Args&&... args) { | 12 std::unique_ptr<T> QuicMakeUniqueImpl(Args&&... args) { |
| 13 return std::move(base::MakeUnique<T>(std::forward<Args>(args)...)); | 13 return base::MakeUnique<T>(std::forward<Args>(args)...); |
| 14 } | 14 } |
| 15 | 15 |
| 16 template <typename T> | 16 template <typename T> |
| 17 std::unique_ptr<T> QuicWrapUniqueImpl(T* ptr) { | 17 std::unique_ptr<T> QuicWrapUniqueImpl(T* ptr) { |
| 18 return std::move(base::WrapUnique<T>(ptr)); | 18 return base::WrapUnique<T>(ptr); |
| 19 } | 19 } |
| 20 | 20 |
| 21 } // namespace net | 21 } // namespace net |
| 22 | 22 |
| 23 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ | 23 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_ |
| OLD | NEW |