Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 void SetReferrer(const Referrer& r) { referrer_ = r; } | 58 void SetReferrer(const Referrer& r) { referrer_ = r; } |
| 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 } |
|
falken
2017/04/11 05:53:59
SetCache() and Cache() are quite generic names, bu
yhirano
2017/04/11 06:26:51
[Set]CacheMode sounds better to me, too.
yiyix
2017/04/11 10:00:06
Done.
| |
| 69 void SetCache(WebURLRequest::FetchRequestCache cache) { cache_ = cache; } | |
| 70 WebURLRequest::FetchRequestCache Cache() const { return cache_; } | |
| 69 void SetRedirect(WebURLRequest::FetchRedirectMode redirect) { | 71 void SetRedirect(WebURLRequest::FetchRedirectMode redirect) { |
| 70 redirect_ = redirect; | 72 redirect_ = redirect; |
| 71 } | 73 } |
| 72 WebURLRequest::FetchRedirectMode Redirect() const { return redirect_; } | 74 WebURLRequest::FetchRedirectMode Redirect() const { return redirect_; } |
| 73 void SetResponseTainting(Tainting tainting) { response_tainting_ = tainting; } | 75 void SetResponseTainting(Tainting tainting) { response_tainting_ = tainting; } |
| 74 Tainting ResponseTainting() const { return response_tainting_; } | 76 Tainting ResponseTainting() const { return response_tainting_; } |
| 75 FetchHeaderList* HeaderList() const { return header_list_.Get(); } | 77 FetchHeaderList* HeaderList() const { return header_list_.Get(); } |
| 76 void SetHeaderList(FetchHeaderList* header_list) { | 78 void SetHeaderList(FetchHeaderList* header_list) { |
| 77 header_list_ = header_list; | 79 header_list_ = header_list; |
| 78 } | 80 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 // FIXME: Support m_forceOriginHeaderFlag; | 115 // FIXME: Support m_forceOriginHeaderFlag; |
| 114 bool same_origin_data_url_flag_; | 116 bool same_origin_data_url_flag_; |
| 115 // |m_referrer| consists of referrer string and referrer policy. | 117 // |m_referrer| consists of referrer string and referrer policy. |
| 116 // We use |noReferrerString()| and |clientReferrerString()| as | 118 // We use |noReferrerString()| and |clientReferrerString()| as |
| 117 // "no-referrer" and "client" strings in the spec. | 119 // "no-referrer" and "client" strings in the spec. |
| 118 Referrer referrer_; | 120 Referrer referrer_; |
| 119 // FIXME: Support m_authenticationFlag; | 121 // FIXME: Support m_authenticationFlag; |
| 120 // FIXME: Support m_synchronousFlag; | 122 // FIXME: Support m_synchronousFlag; |
| 121 WebURLRequest::FetchRequestMode mode_; | 123 WebURLRequest::FetchRequestMode mode_; |
| 122 WebURLRequest::FetchCredentialsMode credentials_; | 124 WebURLRequest::FetchCredentialsMode credentials_; |
| 125 WebURLRequest::FetchRequestCache cache_; | |
| 123 WebURLRequest::FetchRedirectMode redirect_; | 126 WebURLRequest::FetchRedirectMode redirect_; |
| 124 // FIXME: Support m_useURLCredentialsFlag; | 127 // FIXME: Support m_useURLCredentialsFlag; |
| 125 // FIXME: Support m_redirectCount; | 128 // FIXME: Support m_redirectCount; |
| 126 Tainting response_tainting_; | 129 Tainting response_tainting_; |
| 127 Member<BodyStreamBuffer> buffer_; | 130 Member<BodyStreamBuffer> buffer_; |
| 128 String mime_type_; | 131 String mime_type_; |
| 129 String integrity_; | 132 String integrity_; |
| 130 RefPtr<EncodedFormData> attached_credential_; | 133 RefPtr<EncodedFormData> attached_credential_; |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace blink | 136 } // namespace blink |
| 134 | 137 |
| 135 #endif // FetchRequestData_h | 138 #endif // FetchRequestData_h |
| OLD | NEW |