OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 using SignedCertificateTimestampList = | 99 using SignedCertificateTimestampList = |
100 WTF::Vector<SignedCertificateTimestamp>; | 100 WTF::Vector<SignedCertificateTimestamp>; |
101 | 101 |
102 struct SecurityDetails { | 102 struct SecurityDetails { |
103 DISALLOW_NEW(); | 103 DISALLOW_NEW(); |
104 SecurityDetails() : validFrom(0), validTo(0) {} | 104 SecurityDetails() : validFrom(0), validTo(0) {} |
105 // All strings are human-readable values. | 105 // All strings are human-readable values. |
106 String protocol; | 106 String protocol; |
107 String keyExchange; | 107 String keyExchange; |
108 // keyExchangeGroup is the empty string if not applicable for the connection
's key exchange. | 108 // keyExchangeGroup is the empty string if not applicable for the |
| 109 // connection's key exchange. |
109 String keyExchangeGroup; | 110 String keyExchangeGroup; |
110 String cipher; | 111 String cipher; |
111 // mac is the empty string when the connection cipher suite does not | 112 // mac is the empty string when the connection cipher suite does not |
112 // have a separate MAC value (i.e. if the cipher suite is AEAD). | 113 // have a separate MAC value (i.e. if the cipher suite is AEAD). |
113 String mac; | 114 String mac; |
114 String subjectName; | 115 String subjectName; |
115 Vector<String> sanList; | 116 Vector<String> sanList; |
116 String issuer; | 117 String issuer; |
117 time_t validFrom; | 118 time_t validFrom; |
118 time_t validTo; | 119 time_t validTo; |
(...skipping 30 matching lines...) Expand all Loading... |
149 const AtomicString& mimeType() const; | 150 const AtomicString& mimeType() const; |
150 void setMimeType(const AtomicString&); | 151 void setMimeType(const AtomicString&); |
151 | 152 |
152 long long expectedContentLength() const; | 153 long long expectedContentLength() const; |
153 void setExpectedContentLength(long long); | 154 void setExpectedContentLength(long long); |
154 | 155 |
155 const AtomicString& textEncodingName() const; | 156 const AtomicString& textEncodingName() const; |
156 void setTextEncodingName(const AtomicString&); | 157 void setTextEncodingName(const AtomicString&); |
157 | 158 |
158 // FIXME: Should compute this on the fly. | 159 // FIXME: Should compute this on the fly. |
159 // There should not be a setter exposed, as suggested file name is determined
based on other headers in a manner that WebCore does not necessarily know about. | 160 // There should not be a setter exposed, as suggested file name is determined |
| 161 // based on other headers in a manner that WebCore does not necessarily know |
| 162 // about. |
160 const String& suggestedFilename() const; | 163 const String& suggestedFilename() const; |
161 void setSuggestedFilename(const String&); | 164 void setSuggestedFilename(const String&); |
162 | 165 |
163 int httpStatusCode() const; | 166 int httpStatusCode() const; |
164 void setHTTPStatusCode(int); | 167 void setHTTPStatusCode(int); |
165 | 168 |
166 const AtomicString& httpStatusText() const; | 169 const AtomicString& httpStatusText() const; |
167 void setHTTPStatusText(const AtomicString&); | 170 void setHTTPStatusText(const AtomicString&); |
168 | 171 |
169 const AtomicString& httpHeaderField(const AtomicString& name) const; | 172 const AtomicString& httpHeaderField(const AtomicString& name) const; |
170 void setHTTPHeaderField(const AtomicString& name, const AtomicString& value); | 173 void setHTTPHeaderField(const AtomicString& name, const AtomicString& value); |
171 void addHTTPHeaderField(const AtomicString& name, const AtomicString& value); | 174 void addHTTPHeaderField(const AtomicString& name, const AtomicString& value); |
172 void clearHTTPHeaderField(const AtomicString& name); | 175 void clearHTTPHeaderField(const AtomicString& name); |
173 const HTTPHeaderMap& httpHeaderFields() const; | 176 const HTTPHeaderMap& httpHeaderFields() const; |
174 | 177 |
175 bool isMultipart() const { return mimeType() == "multipart/x-mixed-replace"; } | 178 bool isMultipart() const { return mimeType() == "multipart/x-mixed-replace"; } |
176 | 179 |
177 bool isAttachment() const; | 180 bool isAttachment() const; |
178 | 181 |
179 // FIXME: These are used by PluginStream on some platforms. Calculations may d
iffer from just returning plain Last-Modified header. | 182 // FIXME: These are used by PluginStream on some platforms. Calculations may |
| 183 // differ from just returning plain Last-Modified header. |
180 // Leaving it for now but this should go away in favor of generic solution. | 184 // Leaving it for now but this should go away in favor of generic solution. |
181 void setLastModifiedDate(time_t); | 185 void setLastModifiedDate(time_t); |
182 time_t lastModifiedDate() const; | 186 time_t lastModifiedDate() const; |
183 | 187 |
184 // These functions return parsed values of the corresponding response headers. | 188 // These functions return parsed values of the corresponding response headers. |
185 // NaN means that the header was not present or had invalid value. | 189 // NaN means that the header was not present or had invalid value. |
186 bool cacheControlContainsNoCache() const; | 190 bool cacheControlContainsNoCache() const; |
187 bool cacheControlContainsNoStore() const; | 191 bool cacheControlContainsNoStore() const; |
188 bool cacheControlContainsMustRevalidate() const; | 192 bool cacheControlContainsMustRevalidate() const; |
189 bool hasCacheValidatorFields() const; | 193 bool hasCacheValidatorFields() const; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // The manifest url of the appcache this response was retrieved from, if any. | 404 // The manifest url of the appcache this response was retrieved from, if any. |
401 // Note: only valid for main resource responses. | 405 // Note: only valid for main resource responses. |
402 KURL m_appCacheManifestURL; | 406 KURL m_appCacheManifestURL; |
403 | 407 |
404 // The multipart boundary of this response. | 408 // The multipart boundary of this response. |
405 Vector<char> m_multipartBoundary; | 409 Vector<char> m_multipartBoundary; |
406 | 410 |
407 // Was the resource fetched over SPDY. See http://dev.chromium.org/spdy | 411 // Was the resource fetched over SPDY. See http://dev.chromium.org/spdy |
408 bool m_wasFetchedViaSPDY; | 412 bool m_wasFetchedViaSPDY; |
409 | 413 |
410 // Was the resource fetched over a channel which used TLS/Next-Protocol-Negoti
ation (also SPDY related). | 414 // Was the resource fetched over a channel which used |
| 415 // TLS/Next-Protocol-Negotiation (also SPDY related). |
411 bool m_wasNpnNegotiated; | 416 bool m_wasNpnNegotiated; |
412 | 417 |
413 // Was the resource fetched over a channel which specified "Alternate-Protocol
" | 418 // Was the resource fetched over a channel which specified |
| 419 // "Alternate-Protocol" |
414 // (e.g.: Alternate-Protocol: 443:npn-spdy/1). | 420 // (e.g.: Alternate-Protocol: 443:npn-spdy/1). |
415 bool m_wasAlternateProtocolAvailable; | 421 bool m_wasAlternateProtocolAvailable; |
416 | 422 |
417 // Was the resource fetched over an explicit proxy (HTTP, SOCKS, etc). | 423 // Was the resource fetched over an explicit proxy (HTTP, SOCKS, etc). |
418 bool m_wasFetchedViaProxy; | 424 bool m_wasFetchedViaProxy; |
419 | 425 |
420 // Was the resource fetched over a ServiceWorker. | 426 // Was the resource fetched over a ServiceWorker. |
421 bool m_wasFetchedViaServiceWorker; | 427 bool m_wasFetchedViaServiceWorker; |
422 | 428 |
423 // Was the resource fetched using a foreign fetch service worker. | 429 // Was the resource fetched using a foreign fetch service worker. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 unsigned short m_remotePort; | 523 unsigned short m_remotePort; |
518 long long m_encodedBodyLength; | 524 long long m_encodedBodyLength; |
519 long long m_decodedBodyLength; | 525 long long m_decodedBodyLength; |
520 String m_downloadedFilePath; | 526 String m_downloadedFilePath; |
521 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 527 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
522 }; | 528 }; |
523 | 529 |
524 } // namespace blink | 530 } // namespace blink |
525 | 531 |
526 #endif // ResourceResponse_h | 532 #endif // ResourceResponse_h |
OLD | NEW |