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

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

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.h ('k') | storage/browser/blob/blob_storage_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_storage_context.cc
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc
index 0e852a624fee2e5f7deba645ffa6831a9a949716..5beb1a52eb4838ddb22efe209f3e42a37d20f638 100644
--- a/storage/browser/blob/blob_storage_context.cc
+++ b/storage/browser/blob/blob_storage_context.cc
@@ -162,7 +162,8 @@ void BlobStorageContext::CompletePendingBlob(
auto runner = base::ThreadTaskRunnerHandle::Get();
for (const auto& callback : entry->build_completion_callbacks) {
runner->PostTask(FROM_HERE,
- base::Bind(callback, entry->state == BlobState::COMPLETE));
+ base::Bind(callback, entry->state == BlobState::COMPLETE,
+ entry->broken_reason));
}
entry->build_completion_callbacks.clear();
}
@@ -234,15 +235,15 @@ bool BlobStorageContext::IsBeingBuilt(const std::string& uuid) const {
void BlobStorageContext::RunOnConstructionComplete(
const std::string& uuid,
- const base::Callback<void(bool)>& done) {
+ const BlobConstructedCallback& done) {
BlobRegistryEntry* entry = registry_.GetEntry(uuid);
DCHECK(entry);
switch (entry->state) {
case BlobState::COMPLETE:
- done.Run(true);
+ done.Run(true, IPCBlobCreationCancelCode::UNKNOWN);
return;
case BlobState::BROKEN:
- done.Run(false);
+ done.Run(false, entry->broken_reason);
return;
case BlobState::PENDING:
entry->build_completion_callbacks.push_back(done);
« no previous file with comments | « storage/browser/blob/blob_storage_context.h ('k') | storage/browser/blob/blob_storage_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698