OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_SLICE_H_ |
| 6 #define STORAGE_BROWSER_BLOB_BLOB_SLICE_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 11 #include <string> |
| 12 #include <vector> |
| 13 |
| 14 #include "base/macros.h" |
| 15 #include "storage/browser/blob/internal_blob_data.h" |
| 16 #include "storage/browser/blob/shareable_blob_data_item.h" |
| 17 |
| 18 namespace storage { |
| 19 |
| 20 struct BlobSlice { |
| 21 BlobSlice(const InternalBlobData& source, uint64_t offset, uint64_t size); |
| 22 ~BlobSlice(); |
| 23 |
| 24 size_t copying_memory_size = 0; |
| 25 |
| 26 // If our first item is a new memory item, where we are a slice of the item |
| 27 // in the original blob. See first_item_slice_offset() and first_item_index(). |
| 28 bool has_sliced_first_memory_item = false; |
| 29 // If our last item is a new memory item, where we are a slice of the item |
| 30 // in the original blob. |
| 31 bool has_sliced_last_memory_item = false; |
| 32 |
| 33 size_t first_item_slice_offset = 0; |
| 34 scoped_refptr<ShareableBlobDataItem> first_source_item; |
| 35 scoped_refptr<ShareableBlobDataItem> last_source_item; |
| 36 |
| 37 std::vector<scoped_refptr<ShareableBlobDataItem>> dest_items; |
| 38 }; |
| 39 |
| 40 } // namespace storage |
| 41 #endif // STORAGE_BROWSER_BLOB_BLOB_SLICE_H_ |
OLD | NEW |