Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: content/child/resource_dispatcher.cc

Issue 2114213002: Fix loading placeholders for Lo-Fi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace fix and rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 9 #include <utility>
10 10
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 request->should_reset_appcache = request_info.should_reset_appcache; 757 request->should_reset_appcache = request_info.should_reset_appcache;
758 request->fetch_request_mode = request_info.fetch_request_mode; 758 request->fetch_request_mode = request_info.fetch_request_mode;
759 request->fetch_credentials_mode = request_info.fetch_credentials_mode; 759 request->fetch_credentials_mode = request_info.fetch_credentials_mode;
760 request->fetch_redirect_mode = request_info.fetch_redirect_mode; 760 request->fetch_redirect_mode = request_info.fetch_redirect_mode;
761 request->fetch_request_context_type = request_info.fetch_request_context_type; 761 request->fetch_request_context_type = request_info.fetch_request_context_type;
762 request->fetch_frame_type = request_info.fetch_frame_type; 762 request->fetch_frame_type = request_info.fetch_frame_type;
763 request->enable_load_timing = request_info.enable_load_timing; 763 request->enable_load_timing = request_info.enable_load_timing;
764 request->enable_upload_progress = request_info.enable_upload_progress; 764 request->enable_upload_progress = request_info.enable_upload_progress;
765 request->do_not_prompt_for_login = request_info.do_not_prompt_for_login; 765 request->do_not_prompt_for_login = request_info.do_not_prompt_for_login;
766 request->report_raw_headers = request_info.report_raw_headers; 766 request->report_raw_headers = request_info.report_raw_headers;
767 request->lofi_state = request_info.lofi_state;
767 768
768 if ((request_info.referrer.policy == blink::WebReferrerPolicyDefault || 769 if ((request_info.referrer.policy == blink::WebReferrerPolicyDefault ||
769 request_info.referrer.policy == 770 request_info.referrer.policy ==
770 blink::WebReferrerPolicyNoReferrerWhenDowngrade) && 771 blink::WebReferrerPolicyNoReferrerWhenDowngrade) &&
771 request_info.referrer.url.SchemeIsCryptographic() && 772 request_info.referrer.url.SchemeIsCryptographic() &&
772 !request_info.url.SchemeIsCryptographic()) { 773 !request_info.url.SchemeIsCryptographic()) {
773 LOG(FATAL) << "Trying to send secure referrer for insecure request " 774 LOG(FATAL) << "Trying to send secure referrer for insecure request "
774 << "without an appropriate referrer policy.\n" 775 << "without an appropriate referrer policy.\n"
775 << "URL = " << request_info.url << "\n" 776 << "URL = " << request_info.url << "\n"
776 << "Referrer = " << request_info.referrer.url; 777 << "Referrer = " << request_info.referrer.url;
(...skipping 15 matching lines...) Expand all
792 request->should_replace_current_entry = 793 request->should_replace_current_entry =
793 extra_data->should_replace_current_entry(); 794 extra_data->should_replace_current_entry();
794 request->transferred_request_child_id = 795 request->transferred_request_child_id =
795 extra_data->transferred_request_child_id(); 796 extra_data->transferred_request_child_id();
796 request->transferred_request_request_id = 797 request->transferred_request_request_id =
797 extra_data->transferred_request_request_id(); 798 extra_data->transferred_request_request_id();
798 request->service_worker_provider_id = 799 request->service_worker_provider_id =
799 extra_data->service_worker_provider_id(); 800 extra_data->service_worker_provider_id();
800 request->originated_from_service_worker = 801 request->originated_from_service_worker =
801 extra_data->originated_from_service_worker(); 802 extra_data->originated_from_service_worker();
802 request->lofi_state = extra_data->lofi_state();
803 request->request_body = request_body; 803 request->request_body = request_body;
804 request->resource_body_stream_url = request_info.resource_body_stream_url; 804 request->resource_body_stream_url = request_info.resource_body_stream_url;
805 request->initiated_in_secure_context = 805 request->initiated_in_secure_context =
806 extra_data->initiated_in_secure_context(); 806 extra_data->initiated_in_secure_context();
807 if (frame_origin) 807 if (frame_origin)
808 *frame_origin = extra_data->frame_origin(); 808 *frame_origin = extra_data->frame_origin();
809 return request; 809 return request;
810 } 810 }
811 811
812 void ResourceDispatcher::SetResourceSchedulingFilter( 812 void ResourceDispatcher::SetResourceSchedulingFilter(
813 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 813 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
814 resource_scheduling_filter_ = resource_scheduling_filter; 814 resource_scheduling_filter_ = resource_scheduling_filter;
815 } 815 }
816 816
817 } // namespace content 817 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698