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

Unified 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: comments, simplification of enums into ONE 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 side-by-side diff with in-line comments
Download patch
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..4d5296878b9c9b5b80f77621e60d73458f021629
--- /dev/null
+++ b/storage/browser/blob/blob_slice.h
@@ -0,0 +1,41 @@
+// 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 offset, uint64_t 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_

Powered by Google App Engine
This is Rietveld 408576698