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

Unified Diff: components/safe_browsing_db/v4_update_protocol_manager.cc

Issue 2029753002: Add an entry in histograms.xml for SafeBrowsing.V4UpdateHttpResponseOrErrorCode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « 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: components/safe_browsing_db/v4_update_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_update_protocol_manager.cc b/components/safe_browsing_db/v4_update_protocol_manager.cc
index 483d57871f50d366d9bb69eb886b3e848f3b7bc6..b6a08e497ca74c58e7189e3f161c4964addb2543 100644
--- a/components/safe_browsing_db/v4_update_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_update_protocol_manager.cc
@@ -9,6 +9,7 @@
#include "base/base64.h"
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/rand_util.h"
#include "base/timer/timer.h"
#include "components/safe_browsing_db/safebrowsing.pb.h"
@@ -328,6 +329,10 @@ void V4UpdateProtocolManager::OnURLFetchComplete(
if (status.status() == net::URLRequestStatus::FAILED) {
RecordUpdateResult(V4OperationResult::NETWORK_ERROR);
+ // Negate the error value since it is negative, see:
+ // net/base/net_error_list.h
+ UMA_HISTOGRAM_SPARSE_SLOWLY("SafeBrowsing.V4UpdateNetworkError",
Nathan Parker 2016/06/02 20:56:31 How about recording both the network error or stat
vakh (use Gerrit instead) 2016/06/02 21:43:27 Done.
+ -status.error());
} else {
RecordUpdateResult(V4OperationResult::HTTP_ERROR);
}
« 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