diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 11:40:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 12:42:11 +0000 |
commit | 5d87695f37678f96492b258bbab36486c59866b4 (patch) | |
tree | be9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h | |
parent | 6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff) | |
download | qtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz |
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h')
-rw-r--r-- | chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h b/chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h new file mode 100644 index 00000000000..dc48a43d177 --- /dev/null +++ b/chromium/net/third_party/quiche/src/quic/platform/api/quic_mem_slice_storage.h @@ -0,0 +1,39 @@ +// Copyright 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_MEM_SLICE_STORAGE_H_ +#define QUICHE_QUIC_PLATFORM_API_QUIC_MEM_SLICE_STORAGE_H_ + +#include "net/third_party/quiche/src/quic/platform/api/quic_export.h" +#include "net/quic/platform/impl/quic_mem_slice_storage_impl.h" + +namespace quic { + +// QuicMemSliceStorage is a container class that store QuicMemSlices for further +// use cases such as turning into QuicMemSliceSpan. +class QUIC_EXPORT_PRIVATE QuicMemSliceStorage { + public: + QuicMemSliceStorage(const struct iovec* iov, + int iov_count, + QuicBufferAllocator* allocator, + const QuicByteCount max_slice_len) + : impl_(iov, iov_count, allocator, max_slice_len) {} + + QuicMemSliceStorage(const QuicMemSliceStorage& other) = default; + QuicMemSliceStorage& operator=(const QuicMemSliceStorage& other) = default; + QuicMemSliceStorage(QuicMemSliceStorage&& other) = default; + QuicMemSliceStorage& operator=(QuicMemSliceStorage&& other) = default; + + ~QuicMemSliceStorage() = default; + + // Return a QuicMemSliceSpan form of the storage. + QuicMemSliceSpan ToSpan() { return impl_.ToSpan(); } + + private: + QuicMemSliceStorageImpl impl_; +}; + +} // namespace quic + +#endif // QUICHE_QUIC_PLATFORM_API_QUIC_MEM_SLICE_STORAGE_H_ |