| 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, the referrer to use for the request for the url member. |
| 40 // encoded as the url member. | 41 Referrer referrer; |
| 41 GURL referrer; | |
| 42 | |
| 43 // The referrer policy that applies to the referrer. | |
| 44 blink::WebReferrerPolicy referrer_policy; | |
| 45 | 42 |
| 46 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and | 43 // 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 | 44 // \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 | 45 // the standard MIME header encoding rules. The headers parameter can also |
| 49 // be null if no extra request headers need to be set. | 46 // be null if no extra request headers need to be set. |
| 50 std::string headers; | 47 std::string headers; |
| 51 | 48 |
| 52 // Composed of the values defined in url_request_load_flags.h. | 49 // Composed of the values defined in url_request_load_flags.h. |
| 53 int load_flags; | 50 int load_flags; |
| 54 | 51 |
| (...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. | 96 // Extra data associated with this request. We do not own this pointer. |
| 100 blink::WebURLRequest::ExtraData* extra_data; | 97 blink::WebURLRequest::ExtraData* extra_data; |
| 101 | 98 |
| 102 private: | 99 private: |
| 103 DISALLOW_COPY_AND_ASSIGN(RequestInfo); | 100 DISALLOW_COPY_AND_ASSIGN(RequestInfo); |
| 104 }; | 101 }; |
| 105 | 102 |
| 106 } // namespace content | 103 } // namespace content |
| 107 | 104 |
| 108 #endif // CONTENT_CHILD_REQUEST_INFO_H_ | 105 #endif // CONTENT_CHILD_REQUEST_INFO_H_ |
| OLD | NEW |