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

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

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back transport controller test, small cleanups 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_handle.cc
diff --git a/storage/browser/blob/blob_data_handle.cc b/storage/browser/blob/blob_data_handle.cc
index 55e63a1b620697add3368bf82cd0537387de0eb5..2b67bbd5ec060626566e15d9cc92c8a4c235f024 100644
--- a/storage/browser/blob/blob_data_handle.cc
+++ b/storage/browser/blob/blob_data_handle.cc
@@ -67,10 +67,12 @@ BlobDataHandle::BlobDataHandleShared::BlobDataHandleShared(
const std::string& uuid,
const std::string& content_type,
const std::string& content_disposition,
+ uint64_t size,
BlobStorageContext* context)
: uuid_(uuid),
content_type_(content_type),
content_disposition_(content_disposition),
+ size_(size),
context_(context->AsWeakPtr()) {
context_->IncrementBlobRefCount(uuid);
}
@@ -92,12 +94,14 @@ BlobDataHandle::BlobDataHandleShared::~BlobDataHandleShared() {
BlobDataHandle::BlobDataHandle(const std::string& uuid,
const std::string& content_type,
const std::string& content_disposition,
+ uint64_t size,
BlobStorageContext* context,
base::SequencedTaskRunner* io_task_runner)
: io_task_runner_(io_task_runner),
shared_(new BlobDataHandleShared(uuid,
content_type,
content_disposition,
+ size,
context)) {
DCHECK(io_task_runner_.get());
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
@@ -160,4 +164,8 @@ const std::string& BlobDataHandle::content_disposition() const {
return shared_->content_disposition_;
}
+uint64_t BlobDataHandle::size() const {
+ return shared_->size_;
+}
+
} // namespace storage

Powered by Google App Engine
This is Rietveld 408576698