OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_CHILD_REQUEST_INFO_H_ | 5 #ifndef CONTENT_CHILD_REQUEST_INFO_H_ |
6 #define CONTENT_CHILD_REQUEST_INFO_H_ | 6 #define CONTENT_CHILD_REQUEST_INFO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/service_worker/service_worker_types.h" | 13 #include "content/common/service_worker/service_worker_types.h" |
14 #include "content/public/common/referrer.h" | |
14 #include "content/public/common/request_context_frame_type.h" | 15 #include "content/public/common/request_context_frame_type.h" |
15 #include "content/public/common/request_context_type.h" | 16 #include "content/public/common/request_context_type.h" |
16 #include "content/public/common/resource_type.h" | 17 #include "content/public/common/resource_type.h" |
17 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
18 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
19 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 20 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
20 #include "url/gurl.h" | 21 #include "url/gurl.h" |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). | 25 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). |
25 struct CONTENT_EXPORT RequestInfo { | 26 struct CONTENT_EXPORT RequestInfo { |
26 RequestInfo(); | 27 RequestInfo(); |
27 ~RequestInfo(); | 28 ~RequestInfo(); |
28 | 29 |
29 // HTTP-style method name (e.g., "GET" or "POST"). | 30 // HTTP-style method name (e.g., "GET" or "POST"). |
30 std::string method; | 31 std::string method; |
31 | 32 |
32 // Absolute URL encoded in ASCII per the rules of RFC-2396. | 33 // Absolute URL encoded in ASCII per the rules of RFC-2396. |
33 GURL url; | 34 GURL url; |
34 | 35 |
35 // URL of the document in the top-level window, which may be checked by the | 36 // URL of the document in the top-level window, which may be checked by the |
36 // third-party cookie blocking policy. | 37 // third-party cookie blocking policy. |
37 GURL first_party_for_cookies; | 38 GURL first_party_for_cookies; |
38 | 39 |
39 // Optional parameter, a URL with similar constraints in how it must be | 40 // Optional parameter, a URL with similar constraints in how it must be |
Mike West
2014/11/19 08:54:02
Nit: Update the comment.
| |
40 // encoded as the url member. | 41 // encoded as the url member. |
41 GURL referrer; | 42 Referrer referrer; |
42 | |
43 // The referrer policy that applies to the referrer. | |
44 blink::WebReferrerPolicy referrer_policy; | |
45 | 43 |
46 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and | 44 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and |
47 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using | 45 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using |
48 // the standard MIME header encoding rules. The headers parameter can also | 46 // the standard MIME header encoding rules. The headers parameter can also |
49 // be null if no extra request headers need to be set. | 47 // be null if no extra request headers need to be set. |
50 std::string headers; | 48 std::string headers; |
51 | 49 |
52 // Composed of the values defined in url_request_load_flags.h. | 50 // Composed of the values defined in url_request_load_flags.h. |
53 int load_flags; | 51 int load_flags; |
54 | 52 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 // Extra data associated with this request. We do not own this pointer. | 97 // Extra data associated with this request. We do not own this pointer. |
100 blink::WebURLRequest::ExtraData* extra_data; | 98 blink::WebURLRequest::ExtraData* extra_data; |
101 | 99 |
102 private: | 100 private: |
103 DISALLOW_COPY_AND_ASSIGN(RequestInfo); | 101 DISALLOW_COPY_AND_ASSIGN(RequestInfo); |
104 }; | 102 }; |
105 | 103 |
106 } // namespace content | 104 } // namespace content |
107 | 105 |
108 #endif // CONTENT_CHILD_REQUEST_INFO_H_ | 106 #endif // CONTENT_CHILD_REQUEST_INFO_H_ |
OLD | NEW |