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

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

Issue 1846363002: [BlobAsync] Adding better error reporting and some new tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 8 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
« no previous file with comments | « storage/browser/blob/blob_storage_context.cc ('k') | storage/common/blob_storage/blob_storage_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_storage_registry.h
diff --git a/storage/browser/blob/blob_storage_registry.h b/storage/browser/blob/blob_storage_registry.h
index 3b2db9bd2eeeba874322652de35f1040cea8b2d8..5211094b61a2bba35c6085525f865e4c2c27d96d 100644
--- a/storage/browser/blob/blob_storage_registry.h
+++ b/storage/browser/blob/blob_storage_registry.h
@@ -32,6 +32,11 @@ namespace storage {
// uuid. The user must keep track of these.
class STORAGE_EXPORT BlobStorageRegistry {
public:
+ // True means the blob was constructed successfully, and false means that
+ // there was an error, which is reported in the second argument.
+ using BlobConstructedCallback =
+ base::Callback<void(bool, IPCBlobCreationCancelCode)>;
+
enum class BlobState {
// The blob is pending transportation from the renderer. This is the default
// state on entry construction.
@@ -46,7 +51,7 @@ class STORAGE_EXPORT BlobStorageRegistry {
struct STORAGE_EXPORT Entry {
size_t refcount;
BlobState state;
- std::vector<base::Callback<void(bool)>> build_completion_callbacks;
+ std::vector<BlobConstructedCallback> build_completion_callbacks;
// Only applicable if the state == BROKEN.
IPCBlobCreationCancelCode broken_reason =
« no previous file with comments | « storage/browser/blob/blob_storage_context.cc ('k') | storage/common/blob_storage/blob_storage_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698