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

Unified Diff: content/browser/blob_storage/blob_dispatcher_host.cc

Issue 1893293006: [Blob] Added error reporting metrics to invalid message errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/blob_storage/blob_dispatcher_host.cc
diff --git a/content/browser/blob_storage/blob_dispatcher_host.cc b/content/browser/blob_storage/blob_dispatcher_host.cc
index ba15620d8fec4d289beb2801fbf18baa2a56dbd9..22bf25d79c4a38757a070493fce5dc6d6ea8cd6c 100644
--- a/content/browser/blob_storage/blob_dispatcher_host.cc
+++ b/content/browser/blob_storage/blob_dispatcher_host.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/bind.h"
+#include "base/metrics/histogram.h"
Mark P 2016/04/19 19:34:52 Prefer histogram_macros.h
#include "content/browser/bad_message.h"
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/common/fileapi/webblob_messages.h"
@@ -209,6 +210,7 @@ void BlobDispatcherHost::OnIncrementBlobRefCount(const std::string& uuid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BlobStorageContext* context = this->context();
if (uuid.empty() || !context->registry().HasEntry(uuid)) {
+ UMA_HISTOGRAM_BOOLEAN("Storage.Blob.InvalidReferenceInc", true);
Mark P 2016/04/19 19:34:52 If you're only emitting true to this histogram, wh
bad_message::ReceivedBadMessage(
this, bad_message::BDH_INVALID_REFCOUNT_OPERATION);
return;
@@ -220,6 +222,7 @@ void BlobDispatcherHost::OnIncrementBlobRefCount(const std::string& uuid) {
void BlobDispatcherHost::OnDecrementBlobRefCount(const std::string& uuid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (uuid.empty() || !IsInUseInHost(uuid)) {
+ UMA_HISTOGRAM_BOOLEAN("Storage.Blob.InvalidReferenceDec", true);
bad_message::ReceivedBadMessage(
this, bad_message::BDH_INVALID_REFCOUNT_OPERATION);
return;
@@ -249,6 +252,7 @@ void BlobDispatcherHost::OnRegisterPublicBlobURL(const GURL& public_url,
BlobStorageContext* context = this->context();
if (uuid.empty() || !IsInUseInHost(uuid) ||
context->registry().IsURLMapped(public_url)) {
+ UMA_HISTOGRAM_BOOLEAN("Storage.Blob.InvalidURLRegister", true);
Mark P 2016/04/19 19:34:52 analogous comment here
bad_message::ReceivedBadMessage(this,
bad_message::BDH_INVALID_URL_OPERATION);
return;
@@ -260,6 +264,7 @@ void BlobDispatcherHost::OnRegisterPublicBlobURL(const GURL& public_url,
void BlobDispatcherHost::OnRevokePublicBlobURL(const GURL& public_url) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!IsUrlRegisteredInHost(public_url)) {
+ UMA_HISTOGRAM_BOOLEAN("Storage.Blob.InvalidURLRevoke", true);
bad_message::ReceivedBadMessage(this,
bad_message::BDH_INVALID_URL_OPERATION);
return;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698