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

Side by Side Diff: content/browser/loader/resource_request_info_impl.cc

Issue 184873004: Update resource requests to remove redundant frame ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments Created 6 years, 9 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 | Annotate | Revision Log
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 #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/browser/worker_host/worker_service_impl.h" 9 #include "content/browser/worker_host/worker_service_impl.h"
10 #include "content/common/net/url_request_user_data.h" 10 #include "content/common/net/url_request_user_data.h"
(...skipping 22 matching lines...) Expand all
33 bool is_async) { 33 bool is_async) {
34 ResourceRequestInfoImpl* info = 34 ResourceRequestInfoImpl* info =
35 new ResourceRequestInfoImpl( 35 new ResourceRequestInfoImpl(
36 PROCESS_TYPE_RENDERER, // process_type 36 PROCESS_TYPE_RENDERER, // process_type
37 render_process_id, // child_id 37 render_process_id, // child_id
38 render_view_id, // route_id 38 render_view_id, // route_id
39 0, // origin_pid 39 0, // origin_pid
40 0, // request_id 40 0, // request_id
41 render_frame_id, // render_frame_id 41 render_frame_id, // render_frame_id
42 resource_type == ResourceType::MAIN_FRAME, // is_main_frame 42 resource_type == ResourceType::MAIN_FRAME, // is_main_frame
43 0, // frame_id
44 false, // parent_is_main_frame 43 false, // parent_is_main_frame
45 0, // parent_frame_id 44 0, // parent_render_frame_id
46 resource_type, // resource_type 45 resource_type, // resource_type
47 PAGE_TRANSITION_LINK, // transition_type 46 PAGE_TRANSITION_LINK, // transition_type
48 false, // should_replace_current_entry 47 false, // should_replace_current_entry
49 false, // is_download 48 false, // is_download
50 false, // is_stream 49 false, // is_stream
51 true, // allow_download 50 true, // allow_download
52 false, // has_user_gesture 51 false, // has_user_gesture
53 blink::WebReferrerPolicyDefault, // referrer_policy 52 blink::WebReferrerPolicyDefault, // referrer_policy
54 blink::WebPageVisibilityStateVisible, // visibility_state 53 blink::WebPageVisibilityStateVisible, // visibility_state
55 context, // context 54 context, // context
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 87 }
89 88
90 ResourceRequestInfoImpl::ResourceRequestInfoImpl( 89 ResourceRequestInfoImpl::ResourceRequestInfoImpl(
91 int process_type, 90 int process_type,
92 int child_id, 91 int child_id,
93 int route_id, 92 int route_id,
94 int origin_pid, 93 int origin_pid,
95 int request_id, 94 int request_id,
96 int render_frame_id, 95 int render_frame_id,
97 bool is_main_frame, 96 bool is_main_frame,
98 int64 frame_id,
99 bool parent_is_main_frame, 97 bool parent_is_main_frame,
100 int64 parent_frame_id, 98 int parent_render_frame_id,
101 ResourceType::Type resource_type, 99 ResourceType::Type resource_type,
102 PageTransition transition_type, 100 PageTransition transition_type,
103 bool should_replace_current_entry, 101 bool should_replace_current_entry,
104 bool is_download, 102 bool is_download,
105 bool is_stream, 103 bool is_stream,
106 bool allow_download, 104 bool allow_download,
107 bool has_user_gesture, 105 bool has_user_gesture,
108 blink::WebReferrerPolicy referrer_policy, 106 blink::WebReferrerPolicy referrer_policy,
109 blink::WebPageVisibilityState visibility_state, 107 blink::WebPageVisibilityState visibility_state,
110 ResourceContext* context, 108 ResourceContext* context,
111 base::WeakPtr<ResourceMessageFilter> filter, 109 base::WeakPtr<ResourceMessageFilter> filter,
112 bool is_async) 110 bool is_async)
113 : cross_site_handler_(NULL), 111 : cross_site_handler_(NULL),
114 detachable_handler_(NULL), 112 detachable_handler_(NULL),
115 process_type_(process_type), 113 process_type_(process_type),
116 child_id_(child_id), 114 child_id_(child_id),
117 route_id_(route_id), 115 route_id_(route_id),
118 origin_pid_(origin_pid), 116 origin_pid_(origin_pid),
119 request_id_(request_id), 117 request_id_(request_id),
120 render_frame_id_(render_frame_id), 118 render_frame_id_(render_frame_id),
121 is_main_frame_(is_main_frame), 119 is_main_frame_(is_main_frame),
122 frame_id_(frame_id),
123 parent_is_main_frame_(parent_is_main_frame), 120 parent_is_main_frame_(parent_is_main_frame),
124 parent_frame_id_(parent_frame_id), 121 parent_render_frame_id_(parent_render_frame_id),
125 should_replace_current_entry_(should_replace_current_entry), 122 should_replace_current_entry_(should_replace_current_entry),
126 is_download_(is_download), 123 is_download_(is_download),
127 is_stream_(is_stream), 124 is_stream_(is_stream),
128 allow_download_(allow_download), 125 allow_download_(allow_download),
129 has_user_gesture_(has_user_gesture), 126 has_user_gesture_(has_user_gesture),
130 was_ignored_by_handler_(false), 127 was_ignored_by_handler_(false),
131 resource_type_(resource_type), 128 resource_type_(resource_type),
132 transition_type_(transition_type), 129 transition_type_(transition_type),
133 memory_cost_(0), 130 memory_cost_(0),
134 referrer_policy_(referrer_policy), 131 referrer_policy_(referrer_policy),
(...skipping 27 matching lines...) Expand all
162 } 159 }
163 160
164 int ResourceRequestInfoImpl::GetRenderFrameID() const { 161 int ResourceRequestInfoImpl::GetRenderFrameID() const {
165 return render_frame_id_; 162 return render_frame_id_;
166 } 163 }
167 164
168 bool ResourceRequestInfoImpl::IsMainFrame() const { 165 bool ResourceRequestInfoImpl::IsMainFrame() const {
169 return is_main_frame_; 166 return is_main_frame_;
170 } 167 }
171 168
172 int64 ResourceRequestInfoImpl::GetFrameID() const {
173 return frame_id_;
174 }
175
176 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { 169 bool ResourceRequestInfoImpl::ParentIsMainFrame() const {
177 return parent_is_main_frame_; 170 return parent_is_main_frame_;
178 } 171 }
179 172
180 int64 ResourceRequestInfoImpl::GetParentFrameID() const { 173 int ResourceRequestInfoImpl::GetParentRenderFrameID() const {
181 return parent_frame_id_; 174 return parent_render_frame_id_;
182 } 175 }
183 176
184 ResourceType::Type ResourceRequestInfoImpl::GetResourceType() const { 177 ResourceType::Type ResourceRequestInfoImpl::GetResourceType() const {
185 return resource_type_; 178 return resource_type_;
186 } 179 }
187 180
188 int ResourceRequestInfoImpl::GetProcessType() const { 181 int ResourceRequestInfoImpl::GetProcessType() const {
189 return process_type_; 182 return process_type_;
190 } 183 }
191 184
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 252
260 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { 253 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const {
261 return GlobalRoutingID(child_id_, route_id_); 254 return GlobalRoutingID(child_id_, route_id_);
262 } 255 }
263 256
264 void ResourceRequestInfoImpl::UpdateForTransfer( 257 void ResourceRequestInfoImpl::UpdateForTransfer(
265 int child_id, 258 int child_id,
266 int route_id, 259 int route_id,
267 int origin_pid, 260 int origin_pid,
268 int request_id, 261 int request_id,
269 int64 frame_id, 262 int parent_render_frame_id,
270 int64 parent_frame_id,
271 base::WeakPtr<ResourceMessageFilter> filter) { 263 base::WeakPtr<ResourceMessageFilter> filter) {
272 child_id_ = child_id; 264 child_id_ = child_id;
273 route_id_ = route_id; 265 route_id_ = route_id;
274 origin_pid_ = origin_pid; 266 origin_pid_ = origin_pid;
275 request_id_ = request_id; 267 request_id_ = request_id;
276 frame_id_ = frame_id; 268 parent_render_frame_id_ = parent_render_frame_id;
277 filter_ = filter; 269 filter_ = filter;
278 } 270 }
279 271
280 } // namespace content 272 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698