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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); | 284 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); |
285 | 285 |
286 // Remote IP address of the socket which fetched this resource. | 286 // Remote IP address of the socket which fetched this resource. |
287 BLINK_PLATFORM_EXPORT WebString remoteIPAddress() const; | 287 BLINK_PLATFORM_EXPORT WebString remoteIPAddress() const; |
288 BLINK_PLATFORM_EXPORT void setRemoteIPAddress(const WebString&); | 288 BLINK_PLATFORM_EXPORT void setRemoteIPAddress(const WebString&); |
289 | 289 |
290 // Remote port number of the socket which fetched this resource. | 290 // Remote port number of the socket which fetched this resource. |
291 BLINK_PLATFORM_EXPORT unsigned short remotePort() const; | 291 BLINK_PLATFORM_EXPORT unsigned short remotePort() const; |
292 BLINK_PLATFORM_EXPORT void setRemotePort(unsigned short); | 292 BLINK_PLATFORM_EXPORT void setRemotePort(unsigned short); |
293 | 293 |
| 294 // Original size of the response before decompression. |
| 295 BLINK_PLATFORM_EXPORT long long encodedDataLength() const; |
| 296 BLINK_PLATFORM_EXPORT void addToEncodedDataLength(long long); |
| 297 |
294 // Original size of the response body before decompression. | 298 // Original size of the response body before decompression. |
295 BLINK_PLATFORM_EXPORT long long encodedBodyLength() const; | 299 BLINK_PLATFORM_EXPORT long long encodedBodyLength() const; |
296 BLINK_PLATFORM_EXPORT void addToEncodedBodyLength(long long); | 300 BLINK_PLATFORM_EXPORT void addToEncodedBodyLength(long long); |
297 | 301 |
298 // Size of the response body after removing any content encoding. | 302 // Size of the response body after removing any content encoding. |
299 BLINK_PLATFORM_EXPORT long long decodedBodyLength() const; | 303 BLINK_PLATFORM_EXPORT long long decodedBodyLength() const; |
300 BLINK_PLATFORM_EXPORT void addToDecodedBodyLength(long long); | 304 BLINK_PLATFORM_EXPORT void addToDecodedBodyLength(long long); |
301 | 305 |
302 // Extra data associated with the underlying resource response. Resource | 306 // Extra data associated with the underlying resource response. Resource |
303 // responses can be copied. If non-null, each copy of a resource response | 307 // responses can be copied. If non-null, each copy of a resource response |
304 // holds a pointer to the extra data, and the extra data pointer will be | 308 // holds a pointer to the extra data, and the extra data pointer will be |
305 // deleted when the last resource response is destroyed. Setting the extra | 309 // deleted when the last resource response is destroyed. Setting the extra |
306 // data pointer will cause the underlying resource response to be | 310 // data pointer will cause the underlying resource response to be |
307 // dissociated from any existing non-null extra data pointer. | 311 // dissociated from any existing non-null extra data pointer. |
308 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; | 312 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; |
309 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 313 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
310 | 314 |
| 315 BLINK_PLATFORM_EXPORT void appendRedirectResponse(const WebURLResponse&); |
| 316 |
311 #if INSIDE_BLINK | 317 #if INSIDE_BLINK |
312 protected: | 318 protected: |
313 // Permit subclasses to set arbitrary ResourceResponse pointer as | 319 // Permit subclasses to set arbitrary ResourceResponse pointer as |
314 // |m_resourceResponse|. |m_ownedResourceResponse| is not set in this case. | 320 // |m_resourceResponse|. |m_ownedResourceResponse| is not set in this case. |
315 BLINK_PLATFORM_EXPORT explicit WebURLResponse(ResourceResponse&); | 321 BLINK_PLATFORM_EXPORT explicit WebURLResponse(ResourceResponse&); |
316 #endif | 322 #endif |
317 | 323 |
318 private: | 324 private: |
319 struct ResourceResponseContainer; | 325 struct ResourceResponseContainer; |
320 | 326 |
321 // If this instance owns a ResourceResponse then |m_ownedResourceResponse| | 327 // If this instance owns a ResourceResponse then |m_ownedResourceResponse| |
322 // is non-null and |m_resourceResponse| points to the ResourceResponse | 328 // is non-null and |m_resourceResponse| points to the ResourceResponse |
323 // instance it contains. | 329 // instance it contains. |
324 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; | 330 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; |
325 | 331 |
326 // Should never be null. | 332 // Should never be null. |
327 ResourceResponse* m_resourceResponse; | 333 ResourceResponse* m_resourceResponse; |
328 }; | 334 }; |
329 | 335 |
330 } // namespace blink | 336 } // namespace blink |
331 | 337 |
332 #endif | 338 #endif |
OLD | NEW |