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

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

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes, working w/ Layout tests 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.h
diff --git a/storage/browser/blob/blob_data_handle.h b/storage/browser/blob/blob_data_handle.h
index 3f4529346b103cc0149d0a507494011e867153dc..dd8ccb2c2df6f6b27dc5358e080bfe2238719dc1 100644
--- a/storage/browser/blob/blob_data_handle.h
+++ b/storage/browser/blob/blob_data_handle.h
@@ -77,6 +77,9 @@ class STORAGE_EXPORT BlobDataHandle
const std::string& content_type() const;
// May be accessed on any thread.
const std::string& content_disposition() const;
+ // May be accessed on any thread. In rare cases where the blob is created
+ // as a file from the renderer, this will be uint64_max.
+ uint64_t size() const;
// This call and the destruction of the returned snapshot must be called
// on the IO thread. If the blob is broken, then we return a nullptr here.
@@ -94,6 +97,7 @@ class STORAGE_EXPORT BlobDataHandle
BlobDataHandleShared(const std::string& uuid,
const std::string& content_type,
const std::string& content_disposition,
+ uint64_t size,
BlobStorageContext* context);
private:
@@ -106,6 +110,7 @@ class STORAGE_EXPORT BlobDataHandle
const std::string uuid_;
const std::string content_type_;
const std::string content_disposition_;
+ const uint64_t size_;
base::WeakPtr<BlobStorageContext> context_;
DISALLOW_COPY_AND_ASSIGN(BlobDataHandleShared);
@@ -115,6 +120,7 @@ class STORAGE_EXPORT 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);

Powered by Google App Engine
This is Rietveld 408576698