OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); | 269 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); |
270 | 270 |
271 // Remote IP address of the socket which fetched this resource. | 271 // Remote IP address of the socket which fetched this resource. |
272 BLINK_PLATFORM_EXPORT WebString remoteIPAddress() const; | 272 BLINK_PLATFORM_EXPORT WebString remoteIPAddress() const; |
273 BLINK_PLATFORM_EXPORT void setRemoteIPAddress(const WebString&); | 273 BLINK_PLATFORM_EXPORT void setRemoteIPAddress(const WebString&); |
274 | 274 |
275 // Remote port number of the socket which fetched this resource. | 275 // Remote port number of the socket which fetched this resource. |
276 BLINK_PLATFORM_EXPORT unsigned short remotePort() const; | 276 BLINK_PLATFORM_EXPORT unsigned short remotePort() const; |
277 BLINK_PLATFORM_EXPORT void setRemotePort(unsigned short); | 277 BLINK_PLATFORM_EXPORT void setRemotePort(unsigned short); |
278 | 278 |
| 279 // Original size of the response before decompression. |
| 280 BLINK_PLATFORM_EXPORT long long encodedDataLength() const; |
| 281 BLINK_PLATFORM_EXPORT void addToEncodedDataLength(long long); |
| 282 |
279 // Original size of the response body before decompression. | 283 // Original size of the response body before decompression. |
280 BLINK_PLATFORM_EXPORT long long encodedBodyLength() const; | 284 BLINK_PLATFORM_EXPORT long long encodedBodyLength() const; |
281 BLINK_PLATFORM_EXPORT void addToEncodedBodyLength(long long); | 285 BLINK_PLATFORM_EXPORT void addToEncodedBodyLength(long long); |
282 | 286 |
283 // Size of the response body after removing any content encoding. | 287 // Size of the response body after removing any content encoding. |
284 BLINK_PLATFORM_EXPORT long long decodedBodyLength() const; | 288 BLINK_PLATFORM_EXPORT long long decodedBodyLength() const; |
285 BLINK_PLATFORM_EXPORT void addToDecodedBodyLength(long long); | 289 BLINK_PLATFORM_EXPORT void addToDecodedBodyLength(long long); |
286 | 290 |
287 // Extra data associated with the underlying resource response. Resource | 291 // Extra data associated with the underlying resource response. Resource |
288 // responses can be copied. If non-null, each copy of a resource response | 292 // responses can be copied. If non-null, each copy of a resource response |
289 // holds a pointer to the extra data, and the extra data pointer will be | 293 // holds a pointer to the extra data, and the extra data pointer will be |
290 // deleted when the last resource response is destroyed. Setting the extra | 294 // deleted when the last resource response is destroyed. Setting the extra |
291 // data pointer will cause the underlying resource response to be | 295 // data pointer will cause the underlying resource response to be |
292 // dissociated from any existing non-null extra data pointer. | 296 // dissociated from any existing non-null extra data pointer. |
293 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; | 297 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; |
294 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 298 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
295 | 299 |
| 300 BLINK_PLATFORM_EXPORT void appendRedirectResponse(const WebURLResponse&); |
| 301 |
296 #if INSIDE_BLINK | 302 #if INSIDE_BLINK |
297 protected: | 303 protected: |
298 // Permit subclasses to set arbitrary ResourceResponse pointer as | 304 // Permit subclasses to set arbitrary ResourceResponse pointer as |
299 // |m_resourceResponse|. |m_ownedResourceResponse| is not set in this case. | 305 // |m_resourceResponse|. |m_ownedResourceResponse| is not set in this case. |
300 BLINK_PLATFORM_EXPORT explicit WebURLResponse(ResourceResponse&); | 306 BLINK_PLATFORM_EXPORT explicit WebURLResponse(ResourceResponse&); |
301 #endif | 307 #endif |
302 | 308 |
303 private: | 309 private: |
304 struct ResourceResponseContainer; | 310 struct ResourceResponseContainer; |
305 | 311 |
306 // If this instance owns a ResourceResponse then |m_ownedResourceResponse| | 312 // If this instance owns a ResourceResponse then |m_ownedResourceResponse| |
307 // is non-null and |m_resourceResponse| points to the ResourceResponse | 313 // is non-null and |m_resourceResponse| points to the ResourceResponse |
308 // instance it contains. | 314 // instance it contains. |
309 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; | 315 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; |
310 | 316 |
311 // Should never be null. | 317 // Should never be null. |
312 ResourceResponse* m_resourceResponse; | 318 ResourceResponse* m_resourceResponse; |
313 }; | 319 }; |
314 | 320 |
315 } // namespace blink | 321 } // namespace blink |
316 | 322 |
317 #endif | 323 #endif |
OLD | NEW |