Chromium Code Reviews| 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..a0902484030926678a7226601bb53e4f8abbfc99 |
| --- /dev/null |
| +++ b/storage/browser/blob/blob_slice.h |
| @@ -0,0 +1,43 @@ |
| +// 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 slice_offset, |
| + uint64_t slice_size); |
| + ~BlobSlice(); |
| + |
| + size_t copying_memory_size = 0; |
|
michaeln
2016/07/14 01:44:43
a comment about what this is would be nice
we can
dmurph
2016/07/15 02:45:27
Done.
|
| + |
| + // 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(). |
|
michaeln
2016/07/14 01:44:43
comment is stale
dmurph
2016/07/15 02:45:27
Done.
|
| + 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; |
|
michaeln
2016/07/14 01:44:43
Since we have the first_source_item and last_sourc
dmurph
2016/07/15 02:45:27
Done.
|
| + |
| + 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_ |