| Index: storage/browser/blob/blob_slice.h
|
| diff --git a/storage/browser/blob/blob_slice.h b/storage/browser/blob/blob_slice.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4d5296878b9c9b5b80f77621e60d73458f021629
|
| --- /dev/null
|
| +++ b/storage/browser/blob/blob_slice.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2016 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 STORAGE_BROWSER_BLOB_BLOB_SLICE_H_
|
| +#define STORAGE_BROWSER_BLOB_BLOB_SLICE_H_
|
| +
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/macros.h"
|
| +#include "storage/browser/blob/internal_blob_data.h"
|
| +#include "storage/browser/blob/shareable_blob_data_item.h"
|
| +
|
| +namespace storage {
|
| +
|
| +struct BlobSlice {
|
| + BlobSlice(const InternalBlobData& source, uint64_t offset, uint64_t size);
|
| + ~BlobSlice();
|
| +
|
| + size_t copying_memory_size = 0;
|
| +
|
| + // If our first item is a new memory item, where we are a slice of the item
|
| + // in the original blob. See first_item_slice_offset() and first_item_index().
|
| + bool has_sliced_first_memory_item = false;
|
| + // If our last item is a new memory item, where we are a slice of the item
|
| + // in the original blob.
|
| + bool has_sliced_last_memory_item = false;
|
| +
|
| + size_t first_item_slice_offset = 0;
|
| + scoped_refptr<ShareableBlobDataItem> first_source_item;
|
| + scoped_refptr<ShareableBlobDataItem> last_source_item;
|
| +
|
| + std::vector<scoped_refptr<ShareableBlobDataItem>> dest_items;
|
| +};
|
| +
|
| +} // namespace storage
|
| +#endif // STORAGE_BROWSER_BLOB_BLOB_SLICE_H_
|
|
|