Index: content/browser/loader/resource_dispatcher_host_impl.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
index 3849313958054add332c20ecf097b12344f45395..477366c1e75d25ea7c9829a64c37035857b3c629 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.cc |
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
@@ -231,8 +231,9 @@ net::Error CallbackAndReturn( |
return net_error; |
} |
-int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data, |
- int child_id, bool is_sync_load) { |
+int BuildLoadFlagsForRequest( |
+ const ResourceHostMsg_Request& request_data, int child_id, |
+ bool is_sync_load) { |
int load_flags = request_data.load_flags; |
// Although EV status is irrelevant to sub-frames and sub-resources, we have |
@@ -701,6 +702,9 @@ void ResourceDispatcherHostImpl::DidReceiveRedirect(ResourceLoader* loader, |
void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) { |
ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
+ offline_manager_.RequestCompleted(info->GetChildID(), info->GetRouteID(), |
+ loader->request()); |
+ |
int render_process_id, render_view_id; |
if (!info->GetAssociatedRenderView(&render_process_id, &render_view_id)) |
return; |
@@ -933,6 +937,8 @@ void ResourceDispatcherHostImpl::BeginRequest( |
bool is_sync_load = sync_result != NULL; |
int load_flags = |
BuildLoadFlagsForRequest(request_data, child_id, is_sync_load); |
+ load_flags |= offline_manager_.OfflineLoadFlags( |
+ child_id, route_id, request_data); |
// Construct the request. |
scoped_ptr<net::URLRequest> new_request; |
@@ -1368,6 +1374,9 @@ void ResourceDispatcherHostImpl::CancelRequestsForRoute(int child_id, |
CancelBlockedRequestsForRoute(child_id, *iter); |
} |
} |
+ |
+ // Cleanup the offline state for the route. |
+ offline_manager_.RouteDeleted(child_id, route_id); |
} |
// Cancels the request and removes it from the list. |