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

Side by Side Diff: content/common/resource_request.h

Issue 2345253002: Remove content::RequestInfo (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « content/common/resource_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_RESOURCE_REQUEST_H_ 5 #ifndef CONTENT_COMMON_RESOURCE_REQUEST_H_
6 #define CONTENT_COMMON_RESOURCE_REQUEST_H_ 6 #define CONTENT_COMMON_RESOURCE_REQUEST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 namespace content { 27 namespace content {
28 28
29 struct CONTENT_EXPORT ResourceRequest { 29 struct CONTENT_EXPORT ResourceRequest {
30 ResourceRequest(); 30 ResourceRequest();
31 ResourceRequest(const ResourceRequest& request); 31 ResourceRequest(const ResourceRequest& request);
32 ~ResourceRequest(); 32 ~ResourceRequest();
33 33
34 // The request method: GET, POST, etc. 34 // The request method: GET, POST, etc.
35 std::string method; 35 std::string method;
36 36
37 // The requested URL. 37 // The absolute requested URL encoded in ASCII per the rules of RFC-2396.
38 GURL url; 38 GURL url;
39 39
40 // Usually the URL of the document in the top-level window, which may be 40 // URL representing the first-party origin for the request, which may be
41 // checked by the third-party cookie blocking policy. Leaving it empty may 41 // checked by the third-party cookie blocking policy. This is usually the URL
42 // lead to undesired cookie blocking. Third-party cookie blocking can be 42 // of the document in the top-level window. Leaving it empty may lead to
43 // bypassed by setting first_party_for_cookies = url, but this should ideally 43 // undesired cookie blocking. Third-party cookie blocking can be bypassed by
44 // only be done if there really is no way to determine the correct value. 44 // setting first_party_for_cookies = url, but this should ideally only be
45 // done if there really is no way to determine the correct value.
45 GURL first_party_for_cookies; 46 GURL first_party_for_cookies;
46 47
47 // The origin of the context which initiated the request, which will be used 48 // The origin of the context which initiated the request, which will be used
48 // for cookie checks like 'First-Party-Only'. 49 // for cookie checks like 'First-Party-Only'.
49 url::Origin request_initiator; 50 url::Origin request_initiator;
50 51
51 // The referrer to use (may be empty). 52 // The referrer to use (may be empty).
52 GURL referrer; 53 GURL referrer;
53 54
54 // The referrer policy to use. 55 // The referrer policy to use.
55 blink::WebReferrerPolicy referrer_policy = blink::WebReferrerPolicyAlways; 56 blink::WebReferrerPolicy referrer_policy = blink::WebReferrerPolicyAlways;
56 57
57 // The frame's visiblity state. 58 // The frame's visibility state.
58 blink::WebPageVisibilityState visiblity_state = 59 blink::WebPageVisibilityState visibility_state =
59 blink::WebPageVisibilityStateVisible; 60 blink::WebPageVisibilityStateVisible;
60 61
61 // Additional HTTP request headers. 62 // Additional HTTP request headers.
63 //
64 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
65 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
66 // the standard MIME header encoding rules. The headers parameter can also
67 // be null if no extra request headers need to be set.
62 std::string headers; 68 std::string headers;
63 69
64 // net::URLRequest load flags (0 by default). 70 // net::URLRequest load flags (0 by default).
65 int load_flags = 0; 71 int load_flags = 0;
66 72
67 // Process ID from which this request originated, or zero if it originated 73 // Process ID from which this request originated, or zero if it originated
68 // in the renderer itself. 74 // in the renderer itself.
69 int origin_pid = 0; 75 int origin_pid = 0;
70 76
71 // What this resource load is for (main frame, sub-frame, sub-resource, 77 // What this resource load is for (main frame, sub-frame, sub-resource,
72 // object). 78 // object).
73 ResourceType resource_type = RESOURCE_TYPE_MAIN_FRAME; 79 ResourceType resource_type = RESOURCE_TYPE_MAIN_FRAME;
74 80
75 // The priority of this request. 81 // The priority of this request determined by Blink.
76 net::RequestPriority priority = net::IDLE; 82 net::RequestPriority priority = net::IDLE;
77 83
78 // Used by plugin->browser requests to get the correct net::URLRequestContext. 84 // Used by plugin->browser requests to get the correct net::URLRequestContext.
79 uint32_t request_context = 0; 85 uint32_t request_context = 0;
80 86
81 // Indicates which frame (or worker context) the request is being loaded into, 87 // Indicates which frame (or worker context) the request is being loaded into,
82 // or kAppCacheNoHostId. 88 // or kAppCacheNoHostId.
83 int appcache_host_id = kAppCacheNoHostId; 89 int appcache_host_id = kAppCacheNoHostId;
84 90
85 // True if corresponding AppCache group should be resetted. 91 // True if corresponding AppCache group should be resetted.
(...skipping 23 matching lines...) Expand all
109 RequestContextType fetch_request_context_type = 115 RequestContextType fetch_request_context_type =
110 REQUEST_CONTEXT_TYPE_UNSPECIFIED; 116 REQUEST_CONTEXT_TYPE_UNSPECIFIED;
111 117
112 // The frame type passed to the ServiceWorker. 118 // The frame type passed to the ServiceWorker.
113 RequestContextFrameType fetch_frame_type = 119 RequestContextFrameType fetch_frame_type =
114 REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY; 120 REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY;
115 121
116 // Optional resource request body (may be null). 122 // Optional resource request body (may be null).
117 scoped_refptr<ResourceRequestBodyImpl> request_body; 123 scoped_refptr<ResourceRequestBodyImpl> request_body;
118 124
125 // If true, then the response body will be downloaded to a file and the path
126 // to that file will be provided in ResponseInfo::download_file_path.
119 bool download_to_file = false; 127 bool download_to_file = false;
120 128
121 // True if the request was user initiated. 129 // True if the request was user initiated.
122 bool has_user_gesture = false; 130 bool has_user_gesture = false;
123 131
132 // TODO(mmenke): Investigate if enable_load_timing is safe to remove.
133 //
124 // True if load timing data should be collected for request. 134 // True if load timing data should be collected for request.
125 bool enable_load_timing = false; 135 bool enable_load_timing = false;
126 136
127 // True if upload progress should be available for request. 137 // True if upload progress should be available for request.
128 bool enable_upload_progress = false; 138 bool enable_upload_progress = false;
129 139
130 // True if login prompts for this request should be supressed. 140 // True if login prompts for this request should be supressed. Cached
141 // credentials or default credentials may still be used for authentication.
131 bool do_not_prompt_for_login = false; 142 bool do_not_prompt_for_login = false;
132 143
133 // The routing id of the RenderFrame. 144 // The routing id of the RenderFrame.
134 int render_frame_id = 0; 145 int render_frame_id = 0;
135 146
136 // True if |frame_id| is the main frame of a RenderView. 147 // True if |frame_id| is the main frame of a RenderView.
137 bool is_main_frame = false; 148 bool is_main_frame = false;
138 149
139 // True if |parent_render_frame_id| is the main frame of a RenderView. 150 // True if |parent_render_frame_id| is the main frame of a RenderView.
140 bool parent_is_main_frame = false; 151 bool parent_is_main_frame = false;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool initiated_in_secure_context = false; 186 bool initiated_in_secure_context = false;
176 187
177 // The response should be downloaded and stored in the network cache, but not 188 // The response should be downloaded and stored in the network cache, but not
178 // sent back to the renderer. 189 // sent back to the renderer.
179 bool download_to_network_cache_only = false; 190 bool download_to_network_cache_only = false;
180 }; 191 };
181 192
182 } // namespace content 193 } // namespace content
183 194
184 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_ 195 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_
OLDNEW
« no previous file with comments | « content/common/resource_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698