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

Side by Side Diff: content/child/request_info.h

Issue 1411813003: Teach URLRequest about initiator checks for First-Party-Only cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 years, 11 months 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
OLDNEW
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 "base/macros.h" 12 #include "base/macros.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/service_worker/service_worker_types.h" 14 #include "content/common/service_worker/service_worker_types.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "content/public/common/request_context_frame_type.h" 16 #include "content/public/common/request_context_frame_type.h"
17 #include "content/public/common/request_context_type.h" 17 #include "content/public/common/request_context_type.h"
18 #include "content/public/common/resource_type.h" 18 #include "content/public/common/resource_type.h"
19 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" 20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
21 #include "third_party/WebKit/public/platform/WebTaskRunner.h" 21 #include "third_party/WebKit/public/platform/WebTaskRunner.h"
22 #include "third_party/WebKit/public/platform/WebURLRequest.h" 22 #include "third_party/WebKit/public/platform/WebURLRequest.h"
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 #include "url/origin.h"
24 25
25 namespace blink { 26 namespace blink {
26 class WebTaskRunner; 27 class WebTaskRunner;
27 } // namespace blink 28 } // namespace blink
28 29
29 namespace content { 30 namespace content {
30 31
31 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). 32 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader().
32 struct CONTENT_EXPORT RequestInfo { 33 struct CONTENT_EXPORT RequestInfo {
33 RequestInfo(); 34 RequestInfo();
34 ~RequestInfo(); 35 ~RequestInfo();
35 36
36 // HTTP-style method name (e.g., "GET" or "POST"). 37 // HTTP-style method name (e.g., "GET" or "POST").
37 std::string method; 38 std::string method;
38 39
39 // Absolute URL encoded in ASCII per the rules of RFC-2396. 40 // Absolute URL encoded in ASCII per the rules of RFC-2396.
40 GURL url; 41 GURL url;
41 42
42 // URL of the document in the top-level window, which may be checked by the 43 // URL representing the first-party origin for the request, which may be
43 // third-party cookie blocking policy. 44 // checked by the third-party cookie blocking policy.
44 GURL first_party_for_cookies; 45 GURL first_party_for_cookies;
45 46
47 // The origin of the context which initiated the request.
48 url::Origin request_initiator;
49
46 // Optional parameter, the referrer to use for the request for the url member. 50 // Optional parameter, the referrer to use for the request for the url member.
47 Referrer referrer; 51 Referrer referrer;
48 52
49 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and 53 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
50 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using 54 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
51 // the standard MIME header encoding rules. The headers parameter can also 55 // the standard MIME header encoding rules. The headers parameter can also
52 // be null if no extra request headers need to be set. 56 // be null if no extra request headers need to be set.
53 std::string headers; 57 std::string headers;
54 58
55 // Composed of the values defined in url_request_load_flags.h. 59 // Composed of the values defined in url_request_load_flags.h.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Optional, the specific task queue to execute loading tasks on. 123 // Optional, the specific task queue to execute loading tasks on.
120 scoped_ptr<blink::WebTaskRunner> loading_web_task_runner; 124 scoped_ptr<blink::WebTaskRunner> loading_web_task_runner;
121 125
122 private: 126 private:
123 DISALLOW_COPY_AND_ASSIGN(RequestInfo); 127 DISALLOW_COPY_AND_ASSIGN(RequestInfo);
124 }; 128 };
125 129
126 } // namespace content 130 } // namespace content
127 131
128 #endif // CONTENT_CHILD_REQUEST_INFO_H_ 132 #endif // CONTENT_CHILD_REQUEST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698