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

Unified Diff: chromecast/browser/cast_resource_dispatcher_host_delegate.cc

Issue 2154513002: [Chromecast] Add cast event to log resource dispatcher network errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_resource_dispatcher_host_delegate.cc
diff --git a/chromecast/browser/cast_resource_dispatcher_host_delegate.cc b/chromecast/browser/cast_resource_dispatcher_host_delegate.cc
index ff9faa27a3a55b892cc10a67b6e76551ac49d8cb..41a7eadfac0c68992321c2e7d306cf0df25a0e6b 100644
--- a/chromecast/browser/cast_resource_dispatcher_host_delegate.cc
+++ b/chromecast/browser/cast_resource_dispatcher_host_delegate.cc
@@ -4,6 +4,7 @@
#include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
+#include "chromecast/base/metrics/cast_metrics_helper.h"
#include "chromecast/browser/cast_browser_process.h"
#include "chromecast/net/connectivity_checker.h"
#include "net/base/net_errors.h"
@@ -16,6 +17,11 @@ namespace shell {
void CastResourceDispatcherHostDelegate::RequestComplete(
net::URLRequest* url_request) {
if (url_request->status().status() == net::URLRequestStatus::FAILED) {
+ metrics::CastMetricsHelper* metrics_helper =
+ metrics::CastMetricsHelper::GetInstance();
+ metrics_helper->RecordApplicationEventWithValue(
+ "Cast.Platform.ResourceRequestError",
+ url_request->status().error());
LOG(ERROR) << "Failed to load resource " << url_request->url()
<< "; status:" << url_request->status().status() << ", error:"
<< net::ErrorToShortString(url_request->status().error());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698