diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-11 11:32:04 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-18 13:40:17 +0000 |
commit | 31ccca0778db85c159634478b4ec7997f6704860 (patch) | |
tree | 3d33fc3afd9d5ec95541e1bbe074a9cf8da12a0e /chromium/net/quiche | |
parent | 248b70b82a40964d5594eb04feca0fa36716185d (diff) | |
download | qtwebengine-chromium-31ccca0778db85c159634478b4ec7997f6704860.tar.gz |
BASELINE: Update Chromium to 80.0.3987.136
Change-Id: I98e1649aafae85ba3a83e67af00bb27ef301db7b
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'chromium/net/quiche')
4 files changed, 62 insertions, 19 deletions
diff --git a/chromium/net/quiche/common/platform/impl/quiche_endian_impl.h b/chromium/net/quiche/common/platform/impl/quiche_endian_impl.h new file mode 100644 index 00000000000..a29fb5db28f --- /dev/null +++ b/chromium/net/quiche/common/platform/impl/quiche_endian_impl.h @@ -0,0 +1,39 @@ +// Copyright 2019 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. + +#ifndef NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_ENDIAN_IMPL_H_ +#define NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_ENDIAN_IMPL_H_ + +#include "base/sys_byteorder.h" +#include "build/build_config.h" + +namespace quiche { + +class QuicheEndianImpl { + public: + // Convert |x| from host order (can be either little or big endian depending + // on the platform) to network order (big endian). + static uint16_t HostToNet16(uint16_t x) { return base::HostToNet16(x); } + static uint32_t HostToNet32(uint32_t x) { return base::HostToNet32(x); } + static uint64_t HostToNet64(uint64_t x) { return base::HostToNet64(x); } + + // Convert |x| from network order (big endian) to host order (can be either + // little or big endian depending on the platform). + static uint16_t NetToHost16(uint16_t x) { return base::NetToHost16(x); } + static uint32_t NetToHost32(uint32_t x) { return base::NetToHost32(x); } + static uint64_t NetToHost64(uint64_t x) { return base::NetToHost64(x); } + + // Returns true if current host order is little endian. + static bool HostIsLittleEndian() { +#if defined(ARCH_CPU_LITTLE_ENDIAN) + return true; +#else + return false; +#endif + } +}; + +} // namespace quiche + +#endif // NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_ENDIAN_IMPL_H_ diff --git a/chromium/net/quiche/common/platform/impl/quiche_export_impl.h b/chromium/net/quiche/common/platform/impl/quiche_export_impl.h new file mode 100644 index 00000000000..3e9d531877a --- /dev/null +++ b/chromium/net/quiche/common/platform/impl/quiche_export_impl.h @@ -0,0 +1,17 @@ +// Copyright 2019 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. + +#ifndef NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_EXPORT_IMPL_H_ +#define NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_EXPORT_IMPL_H_ + +#include "net/base/net_export.h" + +// These macros are documented in: +// net/third_party/quiche/src/common/platform/api/quiche_export.h + +#define QUICHE_EXPORT NET_EXPORT +#define QUICHE_EXPORT_PRIVATE NET_EXPORT_PRIVATE +#define QUICHE_NO_EXPORT + +#endif // NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_EXPORT_IMPL_H_ diff --git a/chromium/net/quiche/common/platform/impl/quiche_ptr_util_impl.h b/chromium/net/quiche/common/platform/impl/quiche_ptr_util_impl.h deleted file mode 100644 index 8f7dd21e66f..00000000000 --- a/chromium/net/quiche/common/platform/impl/quiche_ptr_util_impl.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019 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. - -#ifndef NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_PTR_UTIL_IMPL_H_ -#define NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_PTR_UTIL_IMPL_H_ - -#include <memory> - -namespace quiche { - -template <typename T, typename... Args> -std::unique_ptr<T> QuicheMakeUniqueImpl(Args&&... args) { - return std::make_unique<T>(std::forward<Args>(args)...); -} - -} // namespace quiche - -#endif // NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_PTR_UTIL_IMPL_H_ diff --git a/chromium/net/quiche/common/platform/impl/quiche_test_impl.h b/chromium/net/quiche/common/platform/impl/quiche_test_impl.h index 11ae28c5b05..705a250f3e4 100644 --- a/chromium/net/quiche/common/platform/impl/quiche_test_impl.h +++ b/chromium/net/quiche/common/platform/impl/quiche_test_impl.h @@ -8,4 +8,10 @@ #include "testing/gmock/include/gmock/gmock.h" // IWYU pragma: export #include "testing/gtest/include/gtest/gtest.h" // IWYU pragma: export +namespace quiche { +namespace test { +class QuicheTest : public ::testing::Test {}; +} // namespace test +} // namespace quiche + #endif // NET_QUICHE_COMMON_PLATFORM_IMPL_QUICHE_TEST_IMPL_H_ |