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 FetchRequestData_h | 5 #ifndef FetchRequestData_h |
6 #define FetchRequestData_h | 6 #define FetchRequestData_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "platform/network/EncodedFormData.h" | 9 #include "platform/network/EncodedFormData.h" |
10 #include "platform/weborigin/KURL.h" | 10 #include "platform/weborigin/KURL.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const AtomicString& ReferrerString() const { return referrer_.referrer; } | 59 const AtomicString& ReferrerString() const { return referrer_.referrer; } |
60 void SetReferrerString(const AtomicString& s) { referrer_.referrer = s; } | 60 void SetReferrerString(const AtomicString& s) { referrer_.referrer = s; } |
61 ReferrerPolicy GetReferrerPolicy() const { return referrer_.referrer_policy; } | 61 ReferrerPolicy GetReferrerPolicy() const { return referrer_.referrer_policy; } |
62 void SetReferrerPolicy(ReferrerPolicy p) { referrer_.referrer_policy = p; } | 62 void SetReferrerPolicy(ReferrerPolicy p) { referrer_.referrer_policy = p; } |
63 void SetMode(WebURLRequest::FetchRequestMode mode) { mode_ = mode; } | 63 void SetMode(WebURLRequest::FetchRequestMode mode) { mode_ = mode; } |
64 WebURLRequest::FetchRequestMode Mode() const { return mode_; } | 64 WebURLRequest::FetchRequestMode Mode() const { return mode_; } |
65 void SetCredentials(WebURLRequest::FetchCredentialsMode); | 65 void SetCredentials(WebURLRequest::FetchCredentialsMode); |
66 WebURLRequest::FetchCredentialsMode Credentials() const { | 66 WebURLRequest::FetchCredentialsMode Credentials() const { |
67 return credentials_; | 67 return credentials_; |
68 } | 68 } |
| 69 void SetCacheMode(WebURLRequest::FetchRequestCacheMode cache_mode) { |
| 70 cache_mode_ = cache_mode; |
| 71 } |
| 72 WebURLRequest::FetchRequestCacheMode CacheMode() const { return cache_mode_; } |
69 void SetRedirect(WebURLRequest::FetchRedirectMode redirect) { | 73 void SetRedirect(WebURLRequest::FetchRedirectMode redirect) { |
70 redirect_ = redirect; | 74 redirect_ = redirect; |
71 } | 75 } |
72 WebURLRequest::FetchRedirectMode Redirect() const { return redirect_; } | 76 WebURLRequest::FetchRedirectMode Redirect() const { return redirect_; } |
73 void SetResponseTainting(Tainting tainting) { response_tainting_ = tainting; } | 77 void SetResponseTainting(Tainting tainting) { response_tainting_ = tainting; } |
74 Tainting ResponseTainting() const { return response_tainting_; } | 78 Tainting ResponseTainting() const { return response_tainting_; } |
75 FetchHeaderList* HeaderList() const { return header_list_.Get(); } | 79 FetchHeaderList* HeaderList() const { return header_list_.Get(); } |
76 void SetHeaderList(FetchHeaderList* header_list) { | 80 void SetHeaderList(FetchHeaderList* header_list) { |
77 header_list_ = header_list; | 81 header_list_ = header_list; |
78 } | 82 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // FIXME: Support m_forceOriginHeaderFlag; | 117 // FIXME: Support m_forceOriginHeaderFlag; |
114 bool same_origin_data_url_flag_; | 118 bool same_origin_data_url_flag_; |
115 // |m_referrer| consists of referrer string and referrer policy. | 119 // |m_referrer| consists of referrer string and referrer policy. |
116 // We use |noReferrerString()| and |clientReferrerString()| as | 120 // We use |noReferrerString()| and |clientReferrerString()| as |
117 // "no-referrer" and "client" strings in the spec. | 121 // "no-referrer" and "client" strings in the spec. |
118 Referrer referrer_; | 122 Referrer referrer_; |
119 // FIXME: Support m_authenticationFlag; | 123 // FIXME: Support m_authenticationFlag; |
120 // FIXME: Support m_synchronousFlag; | 124 // FIXME: Support m_synchronousFlag; |
121 WebURLRequest::FetchRequestMode mode_; | 125 WebURLRequest::FetchRequestMode mode_; |
122 WebURLRequest::FetchCredentialsMode credentials_; | 126 WebURLRequest::FetchCredentialsMode credentials_; |
| 127 // TODO(yiyix): |cache_mode_| is exposed but does not yet affect fetch |
| 128 // behavior. We must transfer the mode to the network layer and service |
| 129 // worker. |
| 130 WebURLRequest::FetchRequestCacheMode cache_mode_; |
123 WebURLRequest::FetchRedirectMode redirect_; | 131 WebURLRequest::FetchRedirectMode redirect_; |
124 // FIXME: Support m_useURLCredentialsFlag; | 132 // FIXME: Support m_useURLCredentialsFlag; |
125 // FIXME: Support m_redirectCount; | 133 // FIXME: Support m_redirectCount; |
126 Tainting response_tainting_; | 134 Tainting response_tainting_; |
127 Member<BodyStreamBuffer> buffer_; | 135 Member<BodyStreamBuffer> buffer_; |
128 String mime_type_; | 136 String mime_type_; |
129 String integrity_; | 137 String integrity_; |
130 RefPtr<EncodedFormData> attached_credential_; | 138 RefPtr<EncodedFormData> attached_credential_; |
131 }; | 139 }; |
132 | 140 |
133 } // namespace blink | 141 } // namespace blink |
134 | 142 |
135 #endif // FetchRequestData_h | 143 #endif // FetchRequestData_h |
OLD | NEW |