| 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 #include "content/browser/loader/resource_request_info_impl.h" | 5 #include "content/browser/loader/resource_request_info_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/loader/global_routing_id.h" | 7 #include "content/browser/loader/global_routing_id.h" |
| 8 #include "content/browser/loader/resource_message_filter.h" | 8 #include "content/browser/loader/resource_message_filter.h" |
| 9 #include "content/common/net/url_request_user_data.h" | 9 #include "content/common/net/url_request_user_data.h" |
| 10 #include "content/public/browser/global_request_id.h" | 10 #include "content/public/browser/global_request_id.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Make sure RESOURCE_TYPE_MAIN_FRAME is declared as being fetched as part of | 40 // Make sure RESOURCE_TYPE_MAIN_FRAME is declared as being fetched as part of |
| 41 // the main frame. | 41 // the main frame. |
| 42 DCHECK(resource_type != RESOURCE_TYPE_MAIN_FRAME || is_main_frame); | 42 DCHECK(resource_type != RESOURCE_TYPE_MAIN_FRAME || is_main_frame); |
| 43 | 43 |
| 44 ResourceRequestInfoImpl* info = | 44 ResourceRequestInfoImpl* info = |
| 45 new ResourceRequestInfoImpl( | 45 new ResourceRequestInfoImpl( |
| 46 PROCESS_TYPE_RENDERER, // process_type | 46 PROCESS_TYPE_RENDERER, // process_type |
| 47 render_process_id, // child_id | 47 render_process_id, // child_id |
| 48 render_view_id, // route_id | 48 render_view_id, // route_id |
| 49 -1, // frame_tree_node_id |
| 49 0, // origin_pid | 50 0, // origin_pid |
| 50 0, // request_id | 51 0, // request_id |
| 51 render_frame_id, // render_frame_id | 52 render_frame_id, // render_frame_id |
| 52 is_main_frame, // is_main_frame | 53 is_main_frame, // is_main_frame |
| 53 parent_is_main_frame, // parent_is_main_frame | 54 parent_is_main_frame, // parent_is_main_frame |
| 54 0, // parent_render_frame_id | 55 0, // parent_render_frame_id |
| 55 resource_type, // resource_type | 56 resource_type, // resource_type |
| 56 ui::PAGE_TRANSITION_LINK, // transition_type | 57 ui::PAGE_TRANSITION_LINK, // transition_type |
| 57 false, // should_replace_current_entry | 58 false, // should_replace_current_entry |
| 58 false, // is_download | 59 false, // is_download |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // static | 97 // static |
| 97 const ResourceRequestInfoImpl* ResourceRequestInfoImpl::ForRequest( | 98 const ResourceRequestInfoImpl* ResourceRequestInfoImpl::ForRequest( |
| 98 const net::URLRequest* request) { | 99 const net::URLRequest* request) { |
| 99 return ForRequest(const_cast<net::URLRequest*>(request)); | 100 return ForRequest(const_cast<net::URLRequest*>(request)); |
| 100 } | 101 } |
| 101 | 102 |
| 102 ResourceRequestInfoImpl::ResourceRequestInfoImpl( | 103 ResourceRequestInfoImpl::ResourceRequestInfoImpl( |
| 103 int process_type, | 104 int process_type, |
| 104 int child_id, | 105 int child_id, |
| 105 int route_id, | 106 int route_id, |
| 107 int frame_tree_node_id, |
| 106 int origin_pid, | 108 int origin_pid, |
| 107 int request_id, | 109 int request_id, |
| 108 int render_frame_id, | 110 int render_frame_id, |
| 109 bool is_main_frame, | 111 bool is_main_frame, |
| 110 bool parent_is_main_frame, | 112 bool parent_is_main_frame, |
| 111 int parent_render_frame_id, | 113 int parent_render_frame_id, |
| 112 ResourceType resource_type, | 114 ResourceType resource_type, |
| 113 ui::PageTransition transition_type, | 115 ui::PageTransition transition_type, |
| 114 bool should_replace_current_entry, | 116 bool should_replace_current_entry, |
| 115 bool is_download, | 117 bool is_download, |
| 116 bool is_stream, | 118 bool is_stream, |
| 117 bool allow_download, | 119 bool allow_download, |
| 118 bool has_user_gesture, | 120 bool has_user_gesture, |
| 119 bool enable_load_timing, | 121 bool enable_load_timing, |
| 120 bool enable_upload_progress, | 122 bool enable_upload_progress, |
| 121 bool do_not_prompt_for_login, | 123 bool do_not_prompt_for_login, |
| 122 blink::WebReferrerPolicy referrer_policy, | 124 blink::WebReferrerPolicy referrer_policy, |
| 123 blink::WebPageVisibilityState visibility_state, | 125 blink::WebPageVisibilityState visibility_state, |
| 124 ResourceContext* context, | 126 ResourceContext* context, |
| 125 base::WeakPtr<ResourceMessageFilter> filter, | 127 base::WeakPtr<ResourceMessageFilter> filter, |
| 126 bool is_async) | 128 bool is_async) |
| 127 : cross_site_handler_(NULL), | 129 : cross_site_handler_(NULL), |
| 128 detachable_handler_(NULL), | 130 detachable_handler_(NULL), |
| 129 process_type_(process_type), | 131 process_type_(process_type), |
| 130 child_id_(child_id), | 132 child_id_(child_id), |
| 131 route_id_(route_id), | 133 route_id_(route_id), |
| 134 frame_tree_node_id_(frame_tree_node_id), |
| 132 origin_pid_(origin_pid), | 135 origin_pid_(origin_pid), |
| 133 request_id_(request_id), | 136 request_id_(request_id), |
| 134 render_frame_id_(render_frame_id), | 137 render_frame_id_(render_frame_id), |
| 135 is_main_frame_(is_main_frame), | 138 is_main_frame_(is_main_frame), |
| 136 parent_is_main_frame_(parent_is_main_frame), | 139 parent_is_main_frame_(parent_is_main_frame), |
| 137 parent_render_frame_id_(parent_render_frame_id), | 140 parent_render_frame_id_(parent_render_frame_id), |
| 138 should_replace_current_entry_(should_replace_current_entry), | 141 should_replace_current_entry_(should_replace_current_entry), |
| 139 is_download_(is_download), | 142 is_download_(is_download), |
| 140 is_stream_(is_stream), | 143 is_stream_(is_stream), |
| 141 allow_download_(allow_download), | 144 allow_download_(allow_download), |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 base::WeakPtr<ResourceMessageFilter> filter) { | 275 base::WeakPtr<ResourceMessageFilter> filter) { |
| 273 child_id_ = child_id; | 276 child_id_ = child_id; |
| 274 route_id_ = route_id; | 277 route_id_ = route_id; |
| 275 origin_pid_ = origin_pid; | 278 origin_pid_ = origin_pid; |
| 276 request_id_ = request_id; | 279 request_id_ = request_id; |
| 277 parent_render_frame_id_ = parent_render_frame_id; | 280 parent_render_frame_id_ = parent_render_frame_id; |
| 278 filter_ = filter; | 281 filter_ = filter; |
| 279 } | 282 } |
| 280 | 283 |
| 281 } // namespace content | 284 } // namespace content |
| OLD | NEW |