Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Side by Side Diff: storage/browser/blob/blob_slice.h

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 "base/memory/ref_counted.h"
16 #include "storage/browser/storage_browser_export.h"
17
18 namespace storage {
19 class InternalBlobData;
20 class ShareableBlobDataItem;
21
22 struct STORAGE_EXPORT BlobSlice {
23 BlobSlice(const InternalBlobData& source,
24 uint64_t slice_offset,
25 uint64_t slice_size);
26 ~BlobSlice();
27
28 size_t copying_memory_size = 0;
29
30 // If our first item is a new memory item, where we are a slice of the item
31 // in the original blob. See first_item_slice_offset() and first_item_index().
32 bool has_sliced_first_memory_item = false;
33 // If our last item is a new memory item, where we are a slice of the item
34 // in the original blob.
35 bool has_sliced_last_memory_item = false;
36
37 size_t first_item_slice_offset = 0;
38 scoped_refptr<ShareableBlobDataItem> first_source_item;
39 scoped_refptr<ShareableBlobDataItem> last_source_item;
40
41 std::vector<scoped_refptr<ShareableBlobDataItem>> dest_items;
42 };
43
44 } // namespace storage
45 #endif // STORAGE_BROWSER_BLOB_BLOB_SLICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698