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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" 5 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
6 6
7 #include "chromecast/base/metrics/cast_metrics_helper.h"
7 #include "chromecast/browser/cast_browser_process.h" 8 #include "chromecast/browser/cast_browser_process.h"
8 #include "chromecast/net/connectivity_checker.h" 9 #include "chromecast/net/connectivity_checker.h"
9 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
10 #include "net/url_request/url_request.h" 11 #include "net/url_request/url_request.h"
11 #include "net/url_request/url_request_status.h" 12 #include "net/url_request/url_request_status.h"
12 13
13 namespace chromecast { 14 namespace chromecast {
14 namespace shell { 15 namespace shell {
15 16
16 void CastResourceDispatcherHostDelegate::RequestComplete( 17 void CastResourceDispatcherHostDelegate::RequestComplete(
17 net::URLRequest* url_request) { 18 net::URLRequest* url_request) {
18 if (url_request->status().status() == net::URLRequestStatus::FAILED) { 19 if (url_request->status().status() == net::URLRequestStatus::FAILED) {
20 metrics::CastMetricsHelper* metrics_helper =
21 metrics::CastMetricsHelper::GetInstance();
22 metrics_helper->RecordApplicationEventWithValue(
23 "Cast.Platform.ResourceRequestError",
24 url_request->status().error());
19 LOG(ERROR) << "Failed to load resource " << url_request->url() 25 LOG(ERROR) << "Failed to load resource " << url_request->url()
20 << "; status:" << url_request->status().status() << ", error:" 26 << "; status:" << url_request->status().status() << ", error:"
21 << net::ErrorToShortString(url_request->status().error()); 27 << net::ErrorToShortString(url_request->status().error());
22 CastBrowserProcess::GetInstance()->connectivity_checker()->Check(); 28 CastBrowserProcess::GetInstance()->connectivity_checker()->Check();
23 } 29 }
24 } 30 }
25 31
26 } // namespace shell 32 } // namespace shell
27 } // namespace chromecast 33 } // namespace chromecast
OLDNEW
« 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