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

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

Issue 2254693002: Delay generation of User-Agent header to URLRequestHttpJob and accept custom User-Agent from XHR/Fe… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed Android test Created 4 years, 4 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 ResourceRequestBodyImpl* request_body, 805 ResourceRequestBodyImpl* request_body,
806 GURL* frame_origin) { 806 GURL* frame_origin) {
807 std::unique_ptr<ResourceRequest> request(new ResourceRequest); 807 std::unique_ptr<ResourceRequest> request(new ResourceRequest);
808 request->method = request_info.method; 808 request->method = request_info.method;
809 request->url = request_info.url; 809 request->url = request_info.url;
810 request->first_party_for_cookies = request_info.first_party_for_cookies; 810 request->first_party_for_cookies = request_info.first_party_for_cookies;
811 request->request_initiator = request_info.request_initiator; 811 request->request_initiator = request_info.request_initiator;
812 request->referrer = request_info.referrer.url; 812 request->referrer = request_info.referrer.url;
813 request->referrer_policy = request_info.referrer.policy; 813 request->referrer_policy = request_info.referrer.policy;
814 request->headers = request_info.headers; 814 request->headers = request_info.headers;
815 request->default_user_agent = request_info.default_user_agent;
815 request->load_flags = request_info.load_flags; 816 request->load_flags = request_info.load_flags;
816 request->origin_pid = request_info.requestor_pid; 817 request->origin_pid = request_info.requestor_pid;
817 request->resource_type = request_info.request_type; 818 request->resource_type = request_info.request_type;
818 request->priority = request_info.priority; 819 request->priority = request_info.priority;
819 request->request_context = request_info.request_context; 820 request->request_context = request_info.request_context;
820 request->appcache_host_id = request_info.appcache_host_id; 821 request->appcache_host_id = request_info.appcache_host_id;
821 request->download_to_file = request_info.download_to_file; 822 request->download_to_file = request_info.download_to_file;
822 request->has_user_gesture = request_info.has_user_gesture; 823 request->has_user_gesture = request_info.has_user_gesture;
823 request->skip_service_worker = request_info.skip_service_worker; 824 request->skip_service_worker = request_info.skip_service_worker;
824 request->should_reset_appcache = request_info.should_reset_appcache; 825 request->should_reset_appcache = request_info.should_reset_appcache;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 *frame_origin = extra_data->frame_origin(); 876 *frame_origin = extra_data->frame_origin();
876 return request; 877 return request;
877 } 878 }
878 879
879 void ResourceDispatcher::SetResourceSchedulingFilter( 880 void ResourceDispatcher::SetResourceSchedulingFilter(
880 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 881 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
881 resource_scheduling_filter_ = resource_scheduling_filter; 882 resource_scheduling_filter_ = resource_scheduling_filter;
882 } 883 }
883 884
884 } // namespace content 885 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698