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

Unified Diff: storage/browser/blob/blob_data_builder.h

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes, working w/ Layout tests Created 4 years, 6 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_data_builder.h
diff --git a/storage/browser/blob/blob_data_builder.h b/storage/browser/blob/blob_data_builder.h
index f304f446555cff8fa0f9291fea32bb2a95b72051..119bb21e9bebb32dd8b3bd3d973d76f231bbdc4a 100644
--- a/storage/browser/blob/blob_data_builder.h
+++ b/storage/browser/blob/blob_data_builder.h
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "storage/browser/blob/blob_data_item.h"
#include "storage/browser/blob/blob_data_snapshot.h"
+#include "storage/browser/blob/shareable_file_reference.h"
#include "storage/browser/storage_browser_export.h"
namespace disk_cache {
@@ -94,6 +95,14 @@ class STORAGE_EXPORT BlobDataBuilder {
uint64_t length,
const base::Time& expected_modification_time);
+ // You must know the length of the file, you cannot use kuint64max to specify
+ // the whole file.
+ void AppendShareableFileReference(
+ const scoped_refptr<ShareableFileReference> file,
+ uint64_t offset,
+ uint64_t length,
+ const base::Time& expected_modification_time);
+
void AppendBlob(const std::string& uuid, uint64_t offset, uint64_t length);
void AppendBlob(const std::string& uuid);
@@ -106,6 +115,7 @@ class STORAGE_EXPORT BlobDataBuilder {
void AppendDiskCacheEntry(const scoped_refptr<DataHandle>& data_handle,
disk_cache::Entry* disk_cache_entry,
int disk_cache_stream_index);
+
// The content of the side data is accessible with BlobReader::ReadSideData().
void AppendDiskCacheEntryWithSideData(
const scoped_refptr<DataHandle>& data_handle,
@@ -124,8 +134,9 @@ class STORAGE_EXPORT BlobDataBuilder {
void Clear();
private:
- friend class BlobStorageContext;
friend class BlobAsyncBuilderHostTest;
+ friend class BlobFlattener;
+ friend class BlobStorageContext;
friend bool operator==(const BlobDataBuilder& a, const BlobDataBuilder& b);
friend bool operator==(const BlobDataSnapshot& a, const BlobDataBuilder& b);
friend STORAGE_EXPORT void PrintTo(const BlobDataBuilder& x,

Powered by Google App Engine
This is Rietveld 408576698