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

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

Issue 141163002: Make PrerenderTracker's resource_throttle_io_thread_map_ use RenderFrame IDs instead of RenderView … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify code Created 6 years, 11 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 0, // frame_id 43 0, // frame_id
44 false, // parent_is_main_frame 44 false, // parent_is_main_frame
45 0, // parent_frame_id 45 0, // parent_frame_id
46 resource_type, // resource_type 46 resource_type, // resource_type
47 PAGE_TRANSITION_LINK, // transition_type 47 PAGE_TRANSITION_LINK, // transition_type
48 false, // should_replace_current_entry 48 false, // should_replace_current_entry
49 false, // is_download 49 false, // is_download
50 false, // is_stream 50 false, // is_stream
51 true, // allow_download 51 true, // allow_download
52 false, // has_user_gesture 52 false, // has_user_gesture
53 blink::WebReferrerPolicyDefault, // referrer_policy 53 blink::WebReferrerPolicyDefault, // referrer_policy
54 blink::WebPageVisibilityStateVisible, // visibility_state
54 context, // context 55 context, // context
55 base::WeakPtr<ResourceMessageFilter>(), // filter 56 base::WeakPtr<ResourceMessageFilter>(), // filter
56 is_async); // is_async 57 is_async); // is_async
57 info->AssociateWithRequest(request); 58 info->AssociateWithRequest(request);
58 } 59 }
59 60
60 // static 61 // static
61 bool ResourceRequestInfo::GetRenderFrameForRequest( 62 bool ResourceRequestInfo::GetRenderFrameForRequest(
62 const net::URLRequest* request, 63 const net::URLRequest* request,
63 int* render_process_id, 64 int* render_process_id,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool parent_is_main_frame, 99 bool parent_is_main_frame,
99 int64 parent_frame_id, 100 int64 parent_frame_id,
100 ResourceType::Type resource_type, 101 ResourceType::Type resource_type,
101 PageTransition transition_type, 102 PageTransition transition_type,
102 bool should_replace_current_entry, 103 bool should_replace_current_entry,
103 bool is_download, 104 bool is_download,
104 bool is_stream, 105 bool is_stream,
105 bool allow_download, 106 bool allow_download,
106 bool has_user_gesture, 107 bool has_user_gesture,
107 blink::WebReferrerPolicy referrer_policy, 108 blink::WebReferrerPolicy referrer_policy,
109 blink::WebPageVisibilityState visibility_state,
108 ResourceContext* context, 110 ResourceContext* context,
109 base::WeakPtr<ResourceMessageFilter> filter, 111 base::WeakPtr<ResourceMessageFilter> filter,
110 bool is_async) 112 bool is_async)
111 : cross_site_handler_(NULL), 113 : cross_site_handler_(NULL),
112 detachable_handler_(NULL), 114 detachable_handler_(NULL),
113 process_type_(process_type), 115 process_type_(process_type),
114 child_id_(child_id), 116 child_id_(child_id),
115 route_id_(route_id), 117 route_id_(route_id),
116 origin_pid_(origin_pid), 118 origin_pid_(origin_pid),
117 request_id_(request_id), 119 request_id_(request_id),
118 render_frame_id_(render_frame_id), 120 render_frame_id_(render_frame_id),
119 is_main_frame_(is_main_frame), 121 is_main_frame_(is_main_frame),
120 frame_id_(frame_id), 122 frame_id_(frame_id),
121 parent_is_main_frame_(parent_is_main_frame), 123 parent_is_main_frame_(parent_is_main_frame),
122 parent_frame_id_(parent_frame_id), 124 parent_frame_id_(parent_frame_id),
123 should_replace_current_entry_(should_replace_current_entry), 125 should_replace_current_entry_(should_replace_current_entry),
124 is_download_(is_download), 126 is_download_(is_download),
125 is_stream_(is_stream), 127 is_stream_(is_stream),
126 allow_download_(allow_download), 128 allow_download_(allow_download),
127 has_user_gesture_(has_user_gesture), 129 has_user_gesture_(has_user_gesture),
128 was_ignored_by_handler_(false), 130 was_ignored_by_handler_(false),
129 resource_type_(resource_type), 131 resource_type_(resource_type),
130 transition_type_(transition_type), 132 transition_type_(transition_type),
131 memory_cost_(0), 133 memory_cost_(0),
132 referrer_policy_(referrer_policy), 134 referrer_policy_(referrer_policy),
135 visibility_state_(visibility_state),
133 context_(context), 136 context_(context),
134 filter_(filter), 137 filter_(filter),
135 is_async_(is_async) { 138 is_async_(is_async) {
136 } 139 }
137 140
138 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { 141 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() {
139 } 142 }
140 143
141 ResourceContext* ResourceRequestInfoImpl::GetContext() const { 144 ResourceContext* ResourceRequestInfoImpl::GetContext() const {
142 return context_; 145 return context_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 182 }
180 183
181 ResourceType::Type ResourceRequestInfoImpl::GetResourceType() const { 184 ResourceType::Type ResourceRequestInfoImpl::GetResourceType() const {
182 return resource_type_; 185 return resource_type_;
183 } 186 }
184 187
185 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { 188 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const {
186 return referrer_policy_; 189 return referrer_policy_;
187 } 190 }
188 191
192 blink::WebPageVisibilityState
193 ResourceRequestInfoImpl::GetVisibilityState() const {
194 return visibility_state_;
195 }
196
189 PageTransition ResourceRequestInfoImpl::GetPageTransition() const { 197 PageTransition ResourceRequestInfoImpl::GetPageTransition() const {
190 return transition_type_; 198 return transition_type_;
191 } 199 }
192 200
193 bool ResourceRequestInfoImpl::HasUserGesture() const { 201 bool ResourceRequestInfoImpl::HasUserGesture() const {
194 return has_user_gesture_; 202 return has_user_gesture_;
195 } 203 }
196 204
197 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const { 205 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const {
198 return was_ignored_by_handler_; 206 return was_ignored_by_handler_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 base::WeakPtr<ResourceMessageFilter> filter) { 267 base::WeakPtr<ResourceMessageFilter> filter) {
260 child_id_ = child_id; 268 child_id_ = child_id;
261 route_id_ = route_id; 269 route_id_ = route_id;
262 origin_pid_ = origin_pid; 270 origin_pid_ = origin_pid;
263 request_id_ = request_id; 271 request_id_ = request_id;
264 frame_id_ = frame_id; 272 frame_id_ = frame_id;
265 filter_ = filter; 273 filter_ = filter;
266 } 274 }
267 275
268 } // namespace content 276 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698