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

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: fixed switch statement Created 4 years, 9 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_storage_registry.h
diff --git a/storage/browser/blob/blob_storage_registry.h b/storage/browser/blob/blob_storage_registry.h
index 8805671625374b3ca30baf9739d8f4e7eab88522..1799d10a85e5651ed20d1feacf7d11e45eee7b06 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 =

Powered by Google App Engine
This is Rietveld 408576698