| 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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 request_data.parent_is_main_frame, | 1210 request_data.parent_is_main_frame, |
| 1211 request_data.parent_render_frame_id, | 1211 request_data.parent_render_frame_id, |
| 1212 request_data.resource_type, | 1212 request_data.resource_type, |
| 1213 request_data.transition_type, | 1213 request_data.transition_type, |
| 1214 request_data.should_replace_current_entry, | 1214 request_data.should_replace_current_entry, |
| 1215 false, // is download | 1215 false, // is download |
| 1216 false, // is stream | 1216 false, // is stream |
| 1217 allow_download, | 1217 allow_download, |
| 1218 request_data.has_user_gesture, | 1218 request_data.has_user_gesture, |
| 1219 request_data.enable_load_timing, | 1219 request_data.enable_load_timing, |
| 1220 request_data.enable_upload_progress, |
| 1220 request_data.referrer_policy, | 1221 request_data.referrer_policy, |
| 1221 request_data.visiblity_state, | 1222 request_data.visiblity_state, |
| 1222 resource_context, | 1223 resource_context, |
| 1223 filter_->GetWeakPtr(), | 1224 filter_->GetWeakPtr(), |
| 1224 !is_sync_load); | 1225 !is_sync_load); |
| 1225 // Request takes ownership. | 1226 // Request takes ownership. |
| 1226 extra_info->AssociateWithRequest(new_request.get()); | 1227 extra_info->AssociateWithRequest(new_request.get()); |
| 1227 | 1228 |
| 1228 if (new_request->url().SchemeIs(url::kBlobScheme)) { | 1229 if (new_request->url().SchemeIs(url::kBlobScheme)) { |
| 1229 // Hang on to a reference to ensure the blob is not released prior | 1230 // Hang on to a reference to ensure the blob is not released prior |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 false, // parent_is_main_frame | 1440 false, // parent_is_main_frame |
| 1440 -1, // parent_render_frame_id | 1441 -1, // parent_render_frame_id |
| 1441 RESOURCE_TYPE_SUB_RESOURCE, | 1442 RESOURCE_TYPE_SUB_RESOURCE, |
| 1442 ui::PAGE_TRANSITION_LINK, | 1443 ui::PAGE_TRANSITION_LINK, |
| 1443 false, // should_replace_current_entry | 1444 false, // should_replace_current_entry |
| 1444 download, // is_download | 1445 download, // is_download |
| 1445 false, // is_stream | 1446 false, // is_stream |
| 1446 download, // allow_download | 1447 download, // allow_download |
| 1447 false, // has_user_gesture | 1448 false, // has_user_gesture |
| 1448 false, // enable_load_timing | 1449 false, // enable_load_timing |
| 1450 false, // enable_upload_progress |
| 1449 blink::WebReferrerPolicyDefault, | 1451 blink::WebReferrerPolicyDefault, |
| 1450 blink::WebPageVisibilityStateVisible, | 1452 blink::WebPageVisibilityStateVisible, |
| 1451 context, | 1453 context, |
| 1452 base::WeakPtr<ResourceMessageFilter>(), // filter | 1454 base::WeakPtr<ResourceMessageFilter>(), // filter |
| 1453 true); // is_async | 1455 true); // is_async |
| 1454 } | 1456 } |
| 1455 | 1457 |
| 1456 void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id, | 1458 void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id, |
| 1457 int route_id, | 1459 int route_id, |
| 1458 bool is_visible, | 1460 bool is_visible, |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 | 2166 |
| 2165 // Add a flag to selectively bypass the data reduction proxy if the resource | 2167 // Add a flag to selectively bypass the data reduction proxy if the resource |
| 2166 // type is not an image. | 2168 // type is not an image. |
| 2167 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2169 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
| 2168 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2170 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
| 2169 | 2171 |
| 2170 return load_flags; | 2172 return load_flags; |
| 2171 } | 2173 } |
| 2172 | 2174 |
| 2173 } // namespace content | 2175 } // namespace content |
| OLD | NEW |