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 8627ebaf3756f574e9f373fd77a4b5a3e9455d33..763afac617c5dfba63e3167e10dc89aa13c544f1 100644 |
--- a/storage/browser/blob/blob_data_builder.h |
+++ b/storage/browser/blob/blob_data_builder.h |
@@ -23,6 +23,7 @@ class Entry; |
namespace storage { |
class BlobStorageContext; |
+class ShareableFileReference; |
class STORAGE_EXPORT BlobDataBuilder { |
public: |
@@ -65,6 +66,21 @@ class STORAGE_EXPORT BlobDataBuilder { |
size_t offset, |
size_t length); |
+ // Adds an item that is flagged for future data population. Use |
+ // 'PopulateFutureFile' to set the file path and expected modification time |
+ // of this file. Returns the index of the item (to be used in |
+ // PopulateFutureFile). Length cannot be 0. |
+ size_t AppendFutureFile(uint64_t offset, uint64_t length); |
+ |
+ // Populates a part of an item previously allocated with AppendFutureFile. |
+ // Returns true if: |
+ // * The item was created by using AppendFutureFile and |
+ // * The filepath is valid. |
+ bool PopulateFutureFile( |
+ size_t index, |
+ const scoped_refptr<ShareableFileReference>& file_reference, |
+ const base::Time& expected_modification_time); |
+ |
// You must know the length of the file, you cannot use kuint64max to specify |
// the whole file. This method creates a ShareableFileReference to the given |
// file, which is stored in this builder. |