Commit 90da3bc3 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

[blink] Remove usage of blink::SparseHistogram in file reader code.

Replace usage with base::UmaHistogramSparse() since I/O should end up
dominating on this control path anyway.

Bug: 1047547
Change-Id: I28dcf9d323ceff6db26ada6d4fee4c4a76e592e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500263Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821154}
parent f9a1a205
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <utility> #include <utility>
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
#include "mojo/public/cpp/system/wait.h" #include "mojo/public/cpp/system/wait.h"
#include "third_party/blink/public/common/blob/blob_utils.h" #include "third_party/blink/public/common/blob/blob_utils.h"
#include "third_party/blink/public/platform/web_url_request.h" #include "third_party/blink/public/platform/web_url_request.h"
...@@ -328,10 +329,8 @@ void FileReaderLoader::OnCalculatedSize(uint64_t total_size, ...@@ -328,10 +329,8 @@ void FileReaderLoader::OnCalculatedSize(uint64_t total_size,
} }
void FileReaderLoader::OnComplete(int32_t status, uint64_t data_length) { void FileReaderLoader::OnComplete(int32_t status, uint64_t data_length) {
DEFINE_THREAD_SAFE_STATIC_LOCAL(SparseHistogram, base::UmaHistogramSparse("Storage.Blob.FileReaderLoader.ReadError",
file_reader_loader_read_errors_histogram, std::max(0, -net_error_));
("Storage.Blob.FileReaderLoader.ReadError"));
file_reader_loader_read_errors_histogram.Sample(std::max(0, -net_error_));
if (status != net::OK) { if (status != net::OK) {
net_error_ = status; net_error_ = status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment