| 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..aa11f661a00495da938ec7a20a960e9a6e14909c
|
| --- /dev/null
|
| +++ b/storage/browser/blob/blob_slice.h
|
| @@ -0,0 +1,45 @@
|
| +// 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 "base/memory/ref_counted.h"
|
| +#include "storage/browser/storage_browser_export.h"
|
| +
|
| +namespace storage {
|
| +class InternalBlobData;
|
| +class ShareableBlobDataItem;
|
| +
|
| +struct STORAGE_EXPORT BlobSlice {
|
| + BlobSlice(const InternalBlobData& source,
|
| + uint64_t slice_offset,
|
| + uint64_t slice_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_
|
|
|