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

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

Issue 1098853003: [BlobAsync] Patch 4: Browser Classes & Logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed temp file, and fixed tests Created 5 years, 1 month 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 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.

Powered by Google App Engine
This is Rietveld 408576698