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

Unified Diff: chromecast/browser/cast_resource_dispatcher_host_delegate.cc

Issue 925183003: [Chromecast] Add connectivity checking for Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments in patchset 1 Created 5 years, 10 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 | « chromecast/browser/cast_resource_dispatcher_host_delegate.h ('k') | chromecast/chromecast.gyp » ('j') | 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
new file mode 100644
index 0000000000000000000000000000000000000000..9a935fb3923cdaa7868edfad4d0ecf5e34c6ea3c
--- /dev/null
+++ b/chromecast/browser/cast_resource_dispatcher_host_delegate.cc
@@ -0,0 +1,26 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
+
+#include "chromecast/browser/cast_browser_process.h"
+#include "chromecast/net/connectivity_checker.h"
+#include "net/base/net_errors.h"
+#include "net/url_request/url_request.h"
+
+namespace chromecast {
+namespace shell {
+
+void CastResourceDispatcherHostDelegate::RequestComplete(
+ net::URLRequest* url_request) {
+ if (!url_request->status().is_success()) {
+ LOG(ERROR) << "Failed to load resource " << url_request->url()
+ << "; status:" << url_request->status().status() << ", error:"
+ << net::ErrorToShortString(url_request->status().error());
+ CastBrowserProcess::GetInstance()->connectivity_checker()->Check();
+ }
+}
+
+} // namespace shell
+} // namespace chromecast
« no previous file with comments | « chromecast/browser/cast_resource_dispatcher_host_delegate.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698