| Index: content/browser/appcache/appcache_request_handler.cc
|
| diff --git a/content/browser/appcache/appcache_request_handler.cc b/content/browser/appcache/appcache_request_handler.cc
|
| index 870fa7d35200c73a52989a24241190d1cd360aa3..5b5ba3365bb2007073ab4cd0dc2d634338942958 100644
|
| --- a/content/browser/appcache/appcache_request_handler.cc
|
| +++ b/content/browser/appcache/appcache_request_handler.cc
|
| @@ -316,12 +316,22 @@ std::unique_ptr<AppCacheJob> AppCacheRequestHandler::MaybeLoadMainResource(
|
| // If a page falls into the scope of a ServiceWorker, any matching AppCaches
|
| // should be ignored. This depends on the ServiceWorker handler being invoked
|
| // prior to the AppCache handler.
|
| - if (ServiceWorkerRequestHandler::IsControlledByServiceWorker(
|
| + // TODO(ananta)
|
| + // We need to handle this for AppCache requests initiated for the network
|
| + // service
|
| + if (request_->GetURLRequest() &&
|
| + ServiceWorkerRequestHandler::IsControlledByServiceWorker(
|
| request_->GetURLRequest())) {
|
| host_->enable_cache_selection(false);
|
| return nullptr;
|
| }
|
|
|
| + if (service_->storage()->IsInitialized() &&
|
| + service_->storage()->usage_map()->find(request_->GetURL().GetOrigin()) ==
|
| + service_->storage()->usage_map()->end()) {
|
| + return nullptr;
|
| + }
|
| +
|
| host_->enable_cache_selection(true);
|
|
|
| const AppCacheHost* spawning_host =
|
|
|