OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 if (new_request->url().SchemeIs(url::kBlobScheme)) { | 1249 if (new_request->url().SchemeIs(url::kBlobScheme)) { |
1250 // Hang on to a reference to ensure the blob is not released prior | 1250 // Hang on to a reference to ensure the blob is not released prior |
1251 // to the job being started. | 1251 // to the job being started. |
1252 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( | 1252 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( |
1253 new_request.get(), | 1253 new_request.get(), |
1254 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( | 1254 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( |
1255 new_request->url())); | 1255 new_request->url())); |
1256 } | 1256 } |
1257 | 1257 |
1258 // Initialize the service worker handler for the request. We don't use | 1258 // Initialize the service worker handler for the request. We don't use |
1259 // ServiceWorker for synchronous loads to avoid renderer deadlocks. We | 1259 // ServiceWorker for synchronous loads to avoid renderer deadlocks. |
1260 // don't use ServiceWorker for favicons to avoid cache tainting. | |
1261 bool is_favicon_load = request_data.resource_type == RESOURCE_TYPE_FAVICON; | |
1262 ServiceWorkerRequestHandler::InitializeHandler( | 1260 ServiceWorkerRequestHandler::InitializeHandler( |
1263 new_request.get(), | 1261 new_request.get(), |
1264 filter_->service_worker_context(), | 1262 filter_->service_worker_context(), |
1265 blob_context, | 1263 blob_context, |
1266 child_id, | 1264 child_id, |
1267 request_data.service_worker_provider_id, | 1265 request_data.service_worker_provider_id, |
1268 request_data.skip_service_worker || is_sync_load || is_favicon_load, | 1266 request_data.skip_service_worker || is_sync_load, |
1269 request_data.fetch_request_mode, | 1267 request_data.fetch_request_mode, |
1270 request_data.fetch_credentials_mode, | 1268 request_data.fetch_credentials_mode, |
1271 request_data.resource_type, | 1269 request_data.resource_type, |
1272 request_data.fetch_request_context_type, | 1270 request_data.fetch_request_context_type, |
1273 request_data.fetch_frame_type, | 1271 request_data.fetch_frame_type, |
1274 request_data.request_body); | 1272 request_data.request_body); |
1275 | 1273 |
1276 // Have the appcache associate its extra info with the request. | 1274 // Have the appcache associate its extra info with the request. |
1277 AppCacheInterceptor::SetExtraRequestInfo( | 1275 AppCacheInterceptor::SetExtraRequestInfo( |
1278 new_request.get(), filter_->appcache_service(), child_id, | 1276 new_request.get(), filter_->appcache_service(), child_id, |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2364 | 2362 |
2365 // Add a flag to selectively bypass the data reduction proxy if the resource | 2363 // Add a flag to selectively bypass the data reduction proxy if the resource |
2366 // type is not an image. | 2364 // type is not an image. |
2367 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2365 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
2368 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2366 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
2369 | 2367 |
2370 return load_flags; | 2368 return load_flags; |
2371 } | 2369 } |
2372 | 2370 |
2373 } // namespace content | 2371 } // namespace content |
OLD | NEW |