| 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/child/resource_dispatcher.h" | 7 #include "content/child/resource_dispatcher.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 request->fetch_credentials_mode = request_info.fetch_credentials_mode; | 759 request->fetch_credentials_mode = request_info.fetch_credentials_mode; |
| 760 request->fetch_request_context_type = request_info.fetch_request_context_type; | 760 request->fetch_request_context_type = request_info.fetch_request_context_type; |
| 761 request->fetch_frame_type = request_info.fetch_frame_type; | 761 request->fetch_frame_type = request_info.fetch_frame_type; |
| 762 request->enable_load_timing = request_info.enable_load_timing; | 762 request->enable_load_timing = request_info.enable_load_timing; |
| 763 request->enable_upload_progress = request_info.enable_upload_progress; | 763 request->enable_upload_progress = request_info.enable_upload_progress; |
| 764 request->do_not_prompt_for_login = request_info.do_not_prompt_for_login; | 764 request->do_not_prompt_for_login = request_info.do_not_prompt_for_login; |
| 765 | 765 |
| 766 if ((request_info.referrer.policy == blink::WebReferrerPolicyDefault || | 766 if ((request_info.referrer.policy == blink::WebReferrerPolicyDefault || |
| 767 request_info.referrer.policy == | 767 request_info.referrer.policy == |
| 768 blink::WebReferrerPolicyNoReferrerWhenDowngrade) && | 768 blink::WebReferrerPolicyNoReferrerWhenDowngrade) && |
| 769 request_info.referrer.url.SchemeIsSecure() && | 769 request_info.referrer.url.SchemeIsCryptographic() && |
| 770 !request_info.url.SchemeIsSecure()) { | 770 !request_info.url.SchemeIsCryptographic()) { |
| 771 LOG(FATAL) << "Trying to send secure referrer for insecure request " | 771 LOG(FATAL) << "Trying to send secure referrer for insecure request " |
| 772 << "without an appropriate referrer policy.\n" | 772 << "without an appropriate referrer policy.\n" |
| 773 << "URL = " << request_info.url << "\n" | 773 << "URL = " << request_info.url << "\n" |
| 774 << "Referrer = " << request_info.referrer.url; | 774 << "Referrer = " << request_info.referrer.url; |
| 775 } | 775 } |
| 776 | 776 |
| 777 const RequestExtraData kEmptyData; | 777 const RequestExtraData kEmptyData; |
| 778 const RequestExtraData* extra_data; | 778 const RequestExtraData* extra_data; |
| 779 if (request_info.extra_data) | 779 if (request_info.extra_data) |
| 780 extra_data = static_cast<RequestExtraData*>(request_info.extra_data); | 780 extra_data = static_cast<RequestExtraData*>(request_info.extra_data); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 795 extra_data->transferred_request_request_id(); | 795 extra_data->transferred_request_request_id(); |
| 796 request->service_worker_provider_id = | 796 request->service_worker_provider_id = |
| 797 extra_data->service_worker_provider_id(); | 797 extra_data->service_worker_provider_id(); |
| 798 request->request_body = request_body; | 798 request->request_body = request_body; |
| 799 if (frame_origin) | 799 if (frame_origin) |
| 800 *frame_origin = extra_data->frame_origin(); | 800 *frame_origin = extra_data->frame_origin(); |
| 801 return request.Pass(); | 801 return request.Pass(); |
| 802 } | 802 } |
| 803 | 803 |
| 804 } // namespace content | 804 } // namespace content |
| OLD | NEW |