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..9ccbc21b498948dc1893dd3e0aa53a65a265e9cf 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 { |
@@ -26,6 +27,8 @@ namespace storage { |
class BlobStorageContext; |
class ShareableFileReference; |
+// A builder should only be used once to create a blob. Use |
+// BlobDataHandle::GetBlobStatus to check for an error after creating the blob. |
class STORAGE_EXPORT BlobDataBuilder { |
public: |
using DataHandle = BlobDataItem::DataHandle; |
@@ -106,6 +109,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 +128,10 @@ class STORAGE_EXPORT BlobDataBuilder { |
void Clear(); |
private: |
- friend class BlobStorageContext; |
friend class BlobAsyncBuilderHostTest; |
+ friend struct BlobFlattener; |
+ friend class BlobStorageContext; |
+ FRIEND_TEST_ALL_PREFIXES(BlobStorageContextTest, BuildBlobFuzzish); |
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, |