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

Side by Side Diff: content/common/resource_request.h

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Addressed comments + rebase Created 4 years, 1 month 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/common/net/url_fetcher.cc ('k') | content/public/common/url_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/common/net/url_fetcher.cc ('k') | content/public/common/url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698