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

Unified Diff: content/browser/net/reporting_service_proxy.cc

Issue 2900553004: Reporting: Add histograms. (Closed)
Patch Set: rebase Created 3 years, 5 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 | net/reporting/reporting_browsing_data_remover.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/net/reporting_service_proxy.cc
diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/net/reporting_service_proxy.cc
index c6785a2261f67dfe64cf20dbaaad02e7a00761e2..b5d17d00c9d9d558f5ebb06928559e7f212846a4 100644
--- a/content/browser/net/reporting_service_proxy.cc
+++ b/content/browser/net/reporting_service_proxy.cc
@@ -14,6 +14,7 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "net/reporting/reporting_report.h"
#include "net/reporting/reporting_service.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -40,13 +41,17 @@ class ReportingServiceProxyImpl : public mojom::ReportingServiceProxy {
net::URLRequestContext* request_context =
request_context_getter_->GetURLRequestContext();
- if (!request_context)
+ if (!request_context) {
+ net::ReportingReport::RecordReportDiscardedForNoURLRequestContext();
return;
+ }
net::ReportingService* reporting_service =
request_context->reporting_service();
- if (!reporting_service)
+ if (!reporting_service) {
+ net::ReportingReport::RecordReportDiscardedForNoReportingService();
return;
+ }
reporting_service->QueueReport(url, group, type, std::move(const_body));
}
« no previous file with comments | « no previous file | net/reporting/reporting_browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698