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

Side by Side Diff: content/child/request_info.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/child/request_extra_data.cc ('k') | content/child/request_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_REQUEST_INFO_H_
6 #define CONTENT_CHILD_REQUEST_INFO_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11 #include <string>
12
13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h"
15 #include "content/common/content_export.h"
16 #include "content/common/navigation_params.h"
17 #include "content/common/service_worker/service_worker_types.h"
18 #include "content/public/common/referrer.h"
19 #include "content/public/common/request_context_frame_type.h"
20 #include "content/public/common/request_context_type.h"
21 #include "content/public/common/resource_type.h"
22 #include "net/base/request_priority.h"
23 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
24 #include "third_party/WebKit/public/platform/WebURLRequest.h"
25 #include "url/gurl.h"
26 #include "url/origin.h"
27
28 namespace base {
29 class SingleThreadTaskRunner;
30 }
31
32 namespace content {
33
34 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader().
35 struct CONTENT_EXPORT RequestInfo {
36 RequestInfo();
37 ~RequestInfo();
38
39 // HTTP-style method name (e.g., "GET" or "POST").
40 std::string method;
41
42 // Absolute URL encoded in ASCII per the rules of RFC-2396.
43 GURL url;
44
45 // URL representing the first-party origin for the request, which may be
46 // checked by the third-party cookie blocking policy.
47 GURL first_party_for_cookies;
48
49 // The origin of the context which initiated the request.
50 url::Origin request_initiator;
51
52 // Optional parameter, the referrer to use for the request for the url member.
53 Referrer referrer;
54
55 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
56 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
57 // the standard MIME header encoding rules. The headers parameter can also
58 // be null if no extra request headers need to be set.
59 std::string headers;
60
61 // Composed of the values defined in url_request_load_flags.h.
62 int load_flags;
63
64 // Process id of the process making the request.
65 int requestor_pid;
66
67 // Indicates if the current request is the main frame load, a sub-frame
68 // load, or a sub objects load.
69 ResourceType request_type;
70 RequestContextType fetch_request_context_type;
71 RequestContextFrameType fetch_frame_type;
72
73 // Indicates the priority of this request, as determined by WebKit.
74 net::RequestPriority priority;
75
76 // Used for plugin to browser requests.
77 uint32_t request_context;
78
79 // Identifies what appcache host this request is associated with.
80 int appcache_host_id;
81
82 // Used to associated the bridge with a frame's network context.
83 int routing_id;
84
85 // If true, then the response body will be downloaded to a file and the
86 // path to that file will be provided in ResponseInfo::download_file_path.
87 bool download_to_file;
88
89 // True if the request was user initiated.
90 bool has_user_gesture;
91
92 // Indicates which types of ServiceWorkers should skip handling this request.
93 SkipServiceWorker skip_service_worker;
94
95 // True if corresponding AppCache group should be resetted.
96 bool should_reset_appcache;
97
98 // The request mode passed to the ServiceWorker.
99 FetchRequestMode fetch_request_mode;
100
101 // The credentials mode passed to the ServiceWorker.
102 FetchCredentialsMode fetch_credentials_mode;
103
104 // The redirect mode used in Fetch API.
105 FetchRedirectMode fetch_redirect_mode;
106
107 // TODO(mmenke): Investigate if enable_load_timing is safe to remove.
108 // True if load timing data should be collected for the request.
109 bool enable_load_timing;
110
111 // True if upload progress should be available.
112 bool enable_upload_progress;
113
114 // True if login prompts for this request should be supressed. Cached
115 // credentials or default credentials may still be used for authentication.
116 bool do_not_prompt_for_login;
117
118 // True if the actual headers from the network stack should be reported
119 // to the renderer
120 bool report_raw_headers;
121
122 // Extra data associated with this request. We do not own this pointer.
123 blink::WebURLRequest::ExtraData* extra_data;
124
125 // Optional, the specific task queue to execute loading tasks on.
126 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner;
127
128 // PlzNavigate: the stream URL to request during navigations to get access to
129 // the ResourceBody that has already been fetched by the browser process.
130 GURL resource_body_stream_url;
131
132 // Whether or not to request a LoFi version of the document or let the browser
133 // decide.
134 LoFiState lofi_state;
135
136 private:
137 DISALLOW_COPY_AND_ASSIGN(RequestInfo);
138 };
139
140 } // namespace content
141
142 #endif // CONTENT_CHILD_REQUEST_INFO_H_
OLDNEW
« no previous file with comments | « content/child/request_extra_data.cc ('k') | content/child/request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698