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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 2931005: Show offline interstitial page when offline and reload when reconnected to network. (Closed)
Patch Set: " Created 10 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
Index: chrome/browser/renderer_host/resource_dispatcher_host.cc
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 3f093aec974add18d7660194e8b5fda77249b49d..130997acdd929ad8d10152c769b616517c38d638 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -64,6 +64,11 @@
#include "webkit/appcache/appcache_interceptor.h"
#include "webkit/appcache/appcache_interfaces.h"
+// TODO(oshima): Enable this for other platforms.
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/renderer_host/offline_resource_handler.h"
+#endif
+
// Uncomment to enable logging of request traffic.
// #define LOG_RESOURCE_DISPATCHER_REQUESTS
@@ -447,6 +452,13 @@ void ResourceDispatcherHost::BeginRequest(
request_data.resource_type);
}
+#if defined(OS_CHROMEOS)
+ // We check offline first, then check safe browsing so that we still can block
+ // unsafe site after we remove offline page.
+ handler =
+ new OfflineResourceHandler(handler, child_id, route_id, this, request);
+#endif
+
// Make extra info and read footer (contains request ID).
ResourceDispatcherHostRequestInfo* extra_info =
new ResourceDispatcherHostRequestInfo(
« no previous file with comments | « chrome/browser/renderer_host/offline_resource_handler.cc ('k') | chrome/browser/renderer_host/resource_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698