Chromium Code Reviews| 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 8eba2c61fdaeb85f84ca1d6913450ad4d2158f28..b091c3050eafcaf3cd263fdda7716b5d8ea294b4 100644 |
| --- a/storage/browser/blob/blob_data_handle.h |
| +++ b/storage/browser/blob/blob_data_handle.h |
| @@ -7,6 +7,7 @@ |
| #include <string> |
| +#include "base/callback_forward.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| @@ -39,6 +40,17 @@ class STORAGE_EXPORT BlobDataHandle |
| BlobDataHandle(const BlobDataHandle& other); // May be copied on any thread. |
| ~BlobDataHandle() override; // May be deleted on any thread. |
| + // Returns if this blob is still constructing. If so, one can use the |
| + // RunWhenConstructionIsComplete to wait. |
|
kinuko
2015/12/13 08:41:45
RunOnConstructionComplete?
dmurph
2015/12/18 03:22:50
Done.
|
| + // Must be called on IO thread. |
| + bool IsAsyncConstructing() const; |
|
kinuko
2015/12/13 08:41:45
IsAsyncConstructing --> should this be called IsBe
dmurph
2015/12/18 03:22:50
Done.
|
| + |
| + // The callback will be run on the IO thread when construction of the blob |
| + // is complete. If construction is already complete, then the task is run |
| + // immediately on the current message loop. |
|
kinuko
2015/12/13 08:41:45
nit: "...on the current message (i.e. IO thread)"
dmurph
2015/12/18 03:22:50
Done.
|
| + // Must be called on IO thread. Returns if construction successful. |
| + void RunOnConstructionComplete(const base::Callback<void(bool)>& done); |
| + |
| // A BlobReader is used to read the data from the blob. This object is |
| // intended to be transient and should not be stored for any extended period |
| // of time. |
| @@ -69,6 +81,9 @@ class STORAGE_EXPORT BlobDataHandle |
| const std::string& content_disposition, |
| BlobStorageContext* context); |
| + bool IsAsyncConstructing() const; |
| + void RunOnConstructionComplete(const base::Callback<void(bool)>& done); |
| + |
| scoped_ptr<BlobDataSnapshot> CreateSnapshot() const; |
| private: |