| OLD | NEW |
| 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 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/optional.h" |
| 12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 13 #include "content/common/navigation_params.h" | 14 #include "content/common/navigation_params.h" |
| 14 #include "content/common/resource_request_body_impl.h" | 15 #include "content/common/resource_request_body_impl.h" |
| 15 #include "content/common/service_worker/service_worker_types.h" | 16 #include "content/common/service_worker/service_worker_types.h" |
| 16 #include "content/public/common/appcache_info.h" | 17 #include "content/public/common/appcache_info.h" |
| 17 #include "content/public/common/request_context_frame_type.h" | 18 #include "content/public/common/request_context_frame_type.h" |
| 18 #include "content/public/common/request_context_type.h" | 19 #include "content/public/common/request_context_type.h" |
| 19 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
| 20 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 21 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 22 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 40 // URL representing the first-party origin for the request, which may be | 41 // URL representing the first-party origin for the request, which may be |
| 41 // checked by the third-party cookie blocking policy. This is usually the URL | 42 // checked by the third-party cookie blocking policy. This is usually the URL |
| 42 // of the document in the top-level window. Leaving it empty may lead to | 43 // of the document in the top-level window. Leaving it empty may lead to |
| 43 // undesired cookie blocking. Third-party cookie blocking can be bypassed by | 44 // undesired cookie blocking. Third-party cookie blocking can be bypassed by |
| 44 // setting first_party_for_cookies = url, but this should ideally only be | 45 // 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. | 46 // done if there really is no way to determine the correct value. |
| 46 GURL first_party_for_cookies; | 47 GURL first_party_for_cookies; |
| 47 | 48 |
| 48 // The origin of the context which initiated the request, which will be used | 49 // The origin of the context which initiated the request, which will be used |
| 49 // for cookie checks like 'First-Party-Only'. | 50 // for cookie checks like 'First-Party-Only'. |
| 50 url::Origin request_initiator; | 51 base::Optional<url::Origin> request_initiator; |
| 51 | 52 |
| 52 // The referrer to use (may be empty). | 53 // The referrer to use (may be empty). |
| 53 GURL referrer; | 54 GURL referrer; |
| 54 | 55 |
| 55 // The referrer policy to use. | 56 // The referrer policy to use. |
| 56 blink::WebReferrerPolicy referrer_policy = blink::WebReferrerPolicyAlways; | 57 blink::WebReferrerPolicy referrer_policy = blink::WebReferrerPolicyAlways; |
| 57 | 58 |
| 58 // The frame's visibility state. | 59 // The frame's visibility state. |
| 59 blink::WebPageVisibilityState visibility_state = | 60 blink::WebPageVisibilityState visibility_state = |
| 60 blink::WebPageVisibilityStateVisible; | 61 blink::WebPageVisibilityStateVisible; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 bool initiated_in_secure_context = false; | 187 bool initiated_in_secure_context = false; |
| 187 | 188 |
| 188 // The response should be downloaded and stored in the network cache, but not | 189 // The response should be downloaded and stored in the network cache, but not |
| 189 // sent back to the renderer. | 190 // sent back to the renderer. |
| 190 bool download_to_network_cache_only = false; | 191 bool download_to_network_cache_only = false; |
| 191 }; | 192 }; |
| 192 | 193 |
| 193 } // namespace content | 194 } // namespace content |
| 194 | 195 |
| 195 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_ | 196 #endif // CONTENT_COMMON_RESOURCE_REQUEST_H_ |
| OLD | NEW |