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

Unified Diff: storage/browser/fileapi/sandbox_file_stream_writer.cc

Issue 1394563002: Add trace to the caller of QuotaManager::GetAvailableSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/fileapi/sandbox_file_stream_writer.cc
diff --git a/storage/browser/fileapi/sandbox_file_stream_writer.cc b/storage/browser/fileapi/sandbox_file_stream_writer.cc
index 74748949ad2e537d75ba8b601137aac249d7b9ca..d6895c894761c80cb5d741626f82ee25c305ffde 100644
--- a/storage/browser/fileapi/sandbox_file_stream_writer.cc
+++ b/storage/browser/fileapi/sandbox_file_stream_writer.cc
@@ -6,6 +6,7 @@
#include "base/files/file_util_proxy.h"
#include "base/sequenced_task_runner.h"
+#include "base/trace_event/trace_event.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "storage/browser/fileapi/file_observers.h"
@@ -151,6 +152,9 @@ void SandboxFileStreamWriter::DidCreateSnapshotFile(
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidCreateSnapshotFile");
+
DCHECK(quota_manager_proxy->quota_manager());
quota_manager_proxy->quota_manager()->GetUsageAndQuota(
url_.origin(),
@@ -168,10 +172,17 @@ void SandboxFileStreamWriter::DidGetUsageAndQuota(
return;
if (status != storage::kQuotaStatusOk) {
LOG(WARNING) << "Got unexpected quota error : " << status;
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidGetUsageAndQuota FAILED");
+
callback.Run(net::ERR_FAILED);
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidGetUsageAndQuota OK");
+
allowed_bytes_to_write_ = quota - usage;
callback.Run(net::OK);
}

Powered by Google App Engine
This is Rietveld 408576698