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