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

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

Issue 1528233004: [Blob] Blob paging to disk patch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blob-disk1
Patch Set: Created 5 years 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
« no previous file with comments | « storage/browser/blob/blob_data_builder.h ('k') | storage/browser/blob/blob_data_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_data_builder.cc
diff --git a/storage/browser/blob/blob_data_builder.cc b/storage/browser/blob/blob_data_builder.cc
index 69d9773bf7d00ce6e0c197c60c9f271e9b3de520..6b7f543a089b204f271202bcfc183fef074450fd 100644
--- a/storage/browser/blob/blob_data_builder.cc
+++ b/storage/browser/blob/blob_data_builder.cc
@@ -8,7 +8,6 @@
#include "base/numerics/safe_math.h"
#include "base/time/time.h"
#include "net/disk_cache/disk_cache.h"
-#include "storage/browser/blob/shareable_file_reference.h"
namespace storage {
@@ -142,6 +141,17 @@ void BlobDataBuilder::AppendFile(const base::FilePath& file_path,
new BlobDataItem(element.Pass(), ShareableFileReference::Get(file_path)));
}
+void BlobDataBuilder::AppendShareableFileReference(
+ const scoped_refptr<ShareableFileReference> file,
+ uint64_t offset,
+ uint64_t length,
+ const base::Time& expected_modification_time) {
+ scoped_ptr<DataElement> element(new DataElement());
+ element->SetToFilePathRange(file->path(), offset, length,
+ expected_modification_time);
+ items_.push_back(new BlobDataItem(element.Pass(), file));
+}
+
void BlobDataBuilder::AppendBlob(const std::string& uuid,
uint64_t offset,
uint64_t length) {
« no previous file with comments | « storage/browser/blob/blob_data_builder.h ('k') | storage/browser/blob/blob_data_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698