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, | |
22 uint64_t slice_offset, | |
23 uint64_t slice_size); | |
24 ~BlobSlice(); | |
25 | |
26 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.
| |
27 | |
28 // If our first item is a new memory item, where we are a slice of the item | |
29 // 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.
| |
30 bool has_sliced_first_memory_item = false; | |
31 // If our last item is a new memory item, where we are a slice of the item | |
32 // in the original blob. | |
33 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.
| |
34 | |
35 size_t first_item_slice_offset = 0; | |
36 scoped_refptr<ShareableBlobDataItem> first_source_item; | |
37 scoped_refptr<ShareableBlobDataItem> last_source_item; | |
38 | |
39 std::vector<scoped_refptr<ShareableBlobDataItem>> dest_items; | |
40 }; | |
41 | |
42 } // namespace storage | |
43 #endif // STORAGE_BROWSER_BLOB_BLOB_SLICE_H_ | |
OLD | NEW |