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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Add DCHECKs for PlzNavigate and fix a double Release problem which caused one unit_test to fail wit… Created 4 years, 1 month 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: 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 d49707809a51eb1a0d21afe0354c7b41c9a5fa7b..ddc337adfaedefdc5217bb0b20ee730a728473f4 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1571,7 +1571,7 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
// Have the appcache associate its extra info with the request.
AppCacheInterceptor::SetExtraRequestInfo(
- new_request.get(), filter_->appcache_service(), child_id,
+ new_request.get(), filter_->appcache_service(), child_id, -1,
request_data.appcache_host_id, request_data.resource_type,
request_data.should_reset_appcache);
@@ -2264,21 +2264,22 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
info.begin_params.request_context_type, frame_type,
info.are_ancestors_secure, info.common_params.post_data);
- // TODO(davidben): Attach AppCacheInterceptor.
+ // Have the appcache associate its extra info with the request.
+ AppCacheInterceptor::SetExtraRequestInfo(
michaeln 2016/11/22 00:17:27 Can the techique we used for service worker work h
ananta 2016/11/23 04:05:14 Added a new function AppCacheInterceptor::SetExtra
+ new_request.get(), info.appcache_service, -1, info.frame_tree_node_id,
+ info.appcache_host_id, resource_type, false);
std::unique_ptr<ResourceHandler> handler(
new NavigationResourceHandler(new_request.get(), loader, delegate()));
- // TODO(davidben): Pass in the appropriate appcache_service. Also fix the
- // dependency on child_id/route_id. Those are used by the ResourceScheduler;
- // currently it's a no-op.
- handler =
- AddStandardHandlers(new_request.get(), resource_type, resource_context,
- info.begin_params.request_context_type,
- nullptr, // appcache_service
- -1, // child_id
- -1, // route_id
- std::move(handler));
+ // TODO(davidben): Fix the dependency on child_id/route_id. Those are used
+ // by the ResourceScheduler. currently it's a no-op.
+ handler = AddStandardHandlers(
+ new_request.get(), resource_type, resource_context,
+ info.begin_params.request_context_type, info.appcache_service,
+ -1, // child_id
+ -1, // route_id
+ std::move(handler));
BeginRequestInternal(std::move(new_request), std::move(handler));
}

Powered by Google App Engine
This is Rietveld 408576698