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

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

Issue 2392283005: Reland "Merge of CrossSiteResourceHandler and NavigationResourceThrottle." (Closed)
Patch Set: Added debugging code from issue 2393903002 Created 4 years, 2 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 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/supports_user_data.h" 15 #include "base/supports_user_data.h"
16 #include "content/common/resource_request_body_impl.h" 16 #include "content/common/resource_request_body_impl.h"
17 #include "content/public/browser/navigation_ui_data.h" 17 #include "content/public/browser/navigation_ui_data.h"
18 #include "content/public/browser/resource_request_info.h" 18 #include "content/public/browser/resource_request_info.h"
19 #include "content/public/common/referrer.h" 19 #include "content/public/common/referrer.h"
20 #include "content/public/common/resource_type.h" 20 #include "content/public/common/resource_type.h"
21 #include "net/base/load_states.h" 21 #include "net/base/load_states.h"
22 22
23 namespace content { 23 namespace content {
24 class CrossSiteResourceHandler;
25 class DetachableResourceHandler; 24 class DetachableResourceHandler;
26 class ResourceContext; 25 class ResourceContext;
27 class ResourceMessageFilter; 26 class ResourceMessageFilter;
28 struct GlobalRequestID; 27 struct GlobalRequestID;
29 struct GlobalRoutingID; 28 struct GlobalRoutingID;
30 29
31 // Holds the data ResourceDispatcherHost associates with each request. 30 // Holds the data ResourceDispatcherHost associates with each request.
32 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. 31 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest.
33 class ResourceRequestInfoImpl : public ResourceRequestInfo, 32 class ResourceRequestInfoImpl : public ResourceRequestInfo,
34 public base::SupportsUserData::Data { 33 public base::SupportsUserData::Data {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // to a new renderer process. Not all data will change during a transfer. 117 // to a new renderer process. Not all data will change during a transfer.
119 // We do not expect the ResourceContext to change during navigation, so that 118 // We do not expect the ResourceContext to change during navigation, so that
120 // does not need to be updated. 119 // does not need to be updated.
121 void UpdateForTransfer(int child_id, 120 void UpdateForTransfer(int child_id,
122 int route_id, 121 int route_id,
123 int render_frame_id, 122 int render_frame_id,
124 int origin_pid, 123 int origin_pid,
125 int request_id, 124 int request_id,
126 base::WeakPtr<ResourceMessageFilter> filter); 125 base::WeakPtr<ResourceMessageFilter> filter);
127 126
128 // CrossSiteResourceHandler for this request. May be null.
129 CrossSiteResourceHandler* cross_site_handler() {
130 return cross_site_handler_;
131 }
132 void set_cross_site_handler(CrossSiteResourceHandler* h) {
133 cross_site_handler_ = h;
134 }
135
136 // Whether this request is part of a navigation that should replace the 127 // Whether this request is part of a navigation that should replace the
137 // current session history entry. This state is shuffled up and down the stack 128 // current session history entry. This state is shuffled up and down the stack
138 // for request transfers. 129 // for request transfers.
139 bool should_replace_current_entry() const { 130 bool should_replace_current_entry() const {
140 return should_replace_current_entry_; 131 return should_replace_current_entry_;
141 } 132 }
142 133
143 // DetachableResourceHandler for this request. May be NULL. 134 // DetachableResourceHandler for this request. May be NULL.
144 DetachableResourceHandler* detachable_handler() const { 135 DetachableResourceHandler* detachable_handler() const {
145 return detachable_handler_; 136 return detachable_handler_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 std::unique_ptr<NavigationUIData> navigation_ui_data) { 195 std::unique_ptr<NavigationUIData> navigation_ui_data) {
205 navigation_ui_data_ = std::move(navigation_ui_data); 196 navigation_ui_data_ = std::move(navigation_ui_data);
206 } 197 }
207 198
208 private: 199 private:
209 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 200 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
210 DeletedFilterDetached); 201 DeletedFilterDetached);
211 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 202 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
212 DeletedFilterDetachedRedirect); 203 DeletedFilterDetachedRedirect);
213 // Non-owning, may be NULL. 204 // Non-owning, may be NULL.
214 CrossSiteResourceHandler* cross_site_handler_;
215 DetachableResourceHandler* detachable_handler_; 205 DetachableResourceHandler* detachable_handler_;
216 206
217 int process_type_; 207 int process_type_;
218 int child_id_; 208 int child_id_;
219 int route_id_; 209 int route_id_;
220 const int frame_tree_node_id_; 210 const int frame_tree_node_id_;
221 int origin_pid_; 211 int origin_pid_;
222 int request_id_; 212 int request_id_;
223 int render_frame_id_; 213 int render_frame_id_;
224 bool is_main_frame_; 214 bool is_main_frame_;
(...skipping 24 matching lines...) Expand all
249 scoped_refptr<ResourceRequestBodyImpl> body_; 239 scoped_refptr<ResourceRequestBodyImpl> body_;
250 bool initiated_in_secure_context_; 240 bool initiated_in_secure_context_;
251 std::unique_ptr<NavigationUIData> navigation_ui_data_; 241 std::unique_ptr<NavigationUIData> navigation_ui_data_;
252 242
253 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 243 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
254 }; 244 };
255 245
256 } // namespace content 246 } // namespace content
257 247
258 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 248 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698