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

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

Issue 1985383002: Logging and check fail crbug/612358 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up logging Created 4 years, 7 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_async_builder_host.cc ('k') | storage/browser/blob/blob_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_reader.cc
diff --git a/storage/browser/blob/blob_reader.cc b/storage/browser/blob/blob_reader.cc
index 2eafdbcc77e6fcdbc8e4ef1d00248d3f5db4f22e..0fae3f21ac2a14ed0e144ee37918ae9f174a52f0 100644
--- a/storage/browser/blob/blob_reader.cc
+++ b/storage/browser/blob/blob_reader.cc
@@ -84,9 +84,11 @@ BlobReader::Status BlobReader::CalculateSize(
DCHECK(!total_size_calculated_);
DCHECK(size_callback_.is_null());
if (!blob_handle_.get() || blob_handle_->IsBroken()) {
+ LOG(ERROR) << "Broken blob, or non existant";
return ReportError(net::ERR_FILE_NOT_FOUND);
}
if (blob_handle_->IsBeingBuilt()) {
+ LOG(ERROR) << blob_handle_->uuid() << " blob still being built";
blob_handle_->RunOnConstructionComplete(base::Bind(
&BlobReader::AsyncCalculateSize, weak_factory_.GetWeakPtr(), done));
return Status::IO_PENDING;
@@ -248,6 +250,7 @@ void BlobReader::InvalidateCallbacksAndDone(int net_error,
}
BlobReader::Status BlobReader::ReportError(int net_error) {
+ LOG(ERROR) << "Reporting error << " << net_error;
net_error_ = net_error;
return Status::NET_ERROR;
}
@@ -256,9 +259,11 @@ void BlobReader::AsyncCalculateSize(const net::CompletionCallback& done,
bool async_succeeded,
IPCBlobCreationCancelCode reason) {
if (!async_succeeded) {
+ LOG(ERROR) << "Blob construction failed";
InvalidateCallbacksAndDone(ConvertBlobErrorToNetError(reason), done);
return;
}
+ LOG(ERROR) << blob_handle_->uuid() << " consruction done";
DCHECK(!blob_handle_->IsBroken()) << "Callback should have returned false.";
blob_data_ = blob_handle_->CreateSnapshot();
Status size_status = CalculateSizeImpl(done);
« no previous file with comments | « storage/browser/blob/blob_async_builder_host.cc ('k') | storage/browser/blob/blob_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698