| 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/referrer.h" |
| 15 #include "content/public/common/request_context_frame_type.h" | 15 #include "content/public/common/request_context_frame_type.h" |
| 16 #include "content/public/common/request_context_type.h" | 16 #include "content/public/common/request_context_type.h" |
| 17 #include "content/public/common/resource_type.h" | 17 #include "content/public/common/resource_type.h" |
| 18 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
| 19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
| 20 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 20 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 #include "url/origin.h" |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| 24 | 25 |
| 25 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). | 26 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). |
| 26 struct CONTENT_EXPORT RequestInfo { | 27 struct CONTENT_EXPORT RequestInfo { |
| 27 RequestInfo(); | 28 RequestInfo(); |
| 28 ~RequestInfo(); | 29 ~RequestInfo(); |
| 29 | 30 |
| 30 // HTTP-style method name (e.g., "GET" or "POST"). | 31 // HTTP-style method name (e.g., "GET" or "POST"). |
| 31 std::string method; | 32 std::string method; |
| 32 | 33 |
| 33 // Absolute URL encoded in ASCII per the rules of RFC-2396. | 34 // Absolute URL encoded in ASCII per the rules of RFC-2396. |
| 34 GURL url; | 35 GURL url; |
| 35 | 36 |
| 36 // URL of the document in the top-level window, which may be checked by the | 37 // URL of the document in the top-level window, which may be checked by the |
| 37 // third-party cookie blocking policy. | 38 // third-party cookie blocking policy. |
| 38 GURL first_party_for_cookies; | 39 GURL first_party_for_cookies; |
| 39 | 40 |
| 41 // The origin responsible for the request, which will be checked by the |
| 42 // first-party-only cookie policy. |
| 43 url::Origin requestor_origin; |
| 44 |
| 40 // Optional parameter, the referrer to use for the request for the url member. | 45 // Optional parameter, the referrer to use for the request for the url member. |
| 41 Referrer referrer; | 46 Referrer referrer; |
| 42 | 47 |
| 43 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and | 48 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and |
| 44 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using | 49 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using |
| 45 // the standard MIME header encoding rules. The headers parameter can also | 50 // the standard MIME header encoding rules. The headers parameter can also |
| 46 // be null if no extra request headers need to be set. | 51 // be null if no extra request headers need to be set. |
| 47 std::string headers; | 52 std::string headers; |
| 48 | 53 |
| 49 // Composed of the values defined in url_request_load_flags.h. | 54 // Composed of the values defined in url_request_load_flags.h. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Extra data associated with this request. We do not own this pointer. | 108 // Extra data associated with this request. We do not own this pointer. |
| 104 blink::WebURLRequest::ExtraData* extra_data; | 109 blink::WebURLRequest::ExtraData* extra_data; |
| 105 | 110 |
| 106 private: | 111 private: |
| 107 DISALLOW_COPY_AND_ASSIGN(RequestInfo); | 112 DISALLOW_COPY_AND_ASSIGN(RequestInfo); |
| 108 }; | 113 }; |
| 109 | 114 |
| 110 } // namespace content | 115 } // namespace content |
| 111 | 116 |
| 112 #endif // CONTENT_CHILD_REQUEST_INFO_H_ | 117 #endif // CONTENT_CHILD_REQUEST_INFO_H_ |
| OLD | NEW |