Chromium Code Reviews| Index: content/browser/frame_host/navigation_request.cc |
| diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc |
| index 4c24485495582a9779114f52df872e9a33ff8b8c..3549e3f0c72cf1a3050fc25bd9fb55c85987eefa 100644 |
| --- a/content/browser/frame_host/navigation_request.cc |
| +++ b/content/browser/frame_host/navigation_request.cc |
| @@ -6,6 +6,8 @@ |
| #include <utility> |
| +#include "content/browser/appcache/appcache_navigation_handle.h" |
| +#include "content/browser/appcache/chrome_appcache_service.h" |
| #include "content/browser/child_process_security_policy_impl.h" |
| #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| #include "content/browser/frame_host/frame_tree.h" |
| @@ -28,6 +30,7 @@ |
| #include "content/public/browser/navigation_ui_data.h" |
| #include "content/public/browser/storage_partition.h" |
| #include "content/public/browser/stream_handle.h" |
| +#include "content/public/common/appcache_info.h" |
| #include "content/public/common/content_client.h" |
| #include "content/public/common/request_context_type.h" |
| #include "content/public/common/resource_response.h" |
| @@ -403,6 +406,11 @@ void NavigationRequest::OnResponseStarted( |
| ->service_worker_provider_host_id() |
| : kInvalidServiceWorkerProviderId; |
| + request_params_.appcache_host_id = |
| + navigation_handle_->appcache_handle() |
| + ? navigation_handle_->appcache_handle()->appcache_host_id() |
| + : kAppCacheNoHostId; |
| + |
| // Update the lofi state of the request. |
| if (response->head.is_using_lofi) |
| common_params_.lofi_state = LOFI_ON; |
| @@ -510,6 +518,12 @@ void NavigationRequest::OnStartChecksComplete( |
| navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| } |
| + if (common_params_.url.scheme() == url::kHttpScheme || |
|
clamy
2016/11/25 13:32:24
I'd prefer you use GURL::SchemeIsHTTPOrHTTPS().
ananta
2016/11/28 21:36:53
Done.
|
| + common_params_.url.scheme() == url::kHttpsScheme) { |
| + navigation_handle_->InitAppCacheHandle( |
| + static_cast<ChromeAppCacheService*>(partition->GetAppCacheService())); |
| + } |
| + |
| // Mark the fetch_start (Navigation Timing API). |
| request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); |
| @@ -545,7 +559,8 @@ void NavigationRequest::OnStartChecksComplete( |
| frame_tree_node_->frame_tree_node_id(), is_for_guests_only, |
| report_raw_headers), |
| std::move(navigation_ui_data), |
| - navigation_handle_->service_worker_handle(), this); |
| + navigation_handle_->service_worker_handle(), |
| + navigation_handle_->appcache_handle(), this); |
| } |
| void NavigationRequest::OnRedirectChecksComplete( |