Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" |
| 40 #include <memory> | 40 #include <memory> |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class ResourceResponse; | 44 class ResourceResponse; |
| 45 class WebHTTPHeaderVisitor; | 45 class WebHTTPHeaderVisitor; |
| 46 class WebHTTPLoadInfo; | 46 class WebHTTPLoadInfo; |
| 47 class WebURL; | 47 class WebURL; |
| 48 class WebURLLoadTiming; | 48 class WebURLLoadTiming; |
| 49 class WebURLResponsePrivate; | |
| 50 | 49 |
| 51 class WebURLResponse { | 50 class WebURLResponse { |
| 52 public: | 51 public: |
| 53 enum HTTPVersion { HTTPVersionUnknown, | 52 enum HTTPVersion { HTTPVersionUnknown, |
| 54 HTTPVersion_0_9, | 53 HTTPVersion_0_9, |
| 55 HTTPVersion_1_0, | 54 HTTPVersion_1_0, |
| 56 HTTPVersion_1_1, | 55 HTTPVersion_1_1, |
| 57 HTTPVersion_2_0 }; | 56 HTTPVersion_2_0 }; |
| 58 enum SecurityStyle { | 57 enum SecurityStyle { |
| 59 SecurityStyleUnknown, | 58 SecurityStyleUnknown, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 // Extra data associated with the underlying resource response. Resource | 285 // Extra data associated with the underlying resource response. Resource |
| 287 // responses can be copied. If non-null, each copy of a resource response | 286 // responses can be copied. If non-null, each copy of a resource response |
| 288 // holds a pointer to the extra data, and the extra data pointer will be | 287 // holds a pointer to the extra data, and the extra data pointer will be |
| 289 // deleted when the last resource response is destroyed. Setting the extra | 288 // deleted when the last resource response is destroyed. Setting the extra |
| 290 // data pointer will cause the underlying resource response to be | 289 // data pointer will cause the underlying resource response to be |
| 291 // dissociated from any existing non-null extra data pointer. | 290 // dissociated from any existing non-null extra data pointer. |
| 292 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; | 291 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; |
| 293 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 292 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 294 | 293 |
| 295 protected: | 294 protected: |
| 296 // Permit subclasses to set arbitrary WebURLResponsePrivate pointer as | 295 // Permit subclasses to set arbitrary ResourceResponse pointer as |
| 297 // |m_private|. Parameter must be non-null. |m_owningPrivate| is not set | 296 // |m_resourceResponse|. Parameter must be non-null. |
| 298 // in this case. | 297 // |m_ownedResourceResponse| is not set in this case. |
| 299 BLINK_PLATFORM_EXPORT explicit WebURLResponse(WebURLResponsePrivate*); | 298 BLINK_PLATFORM_EXPORT explicit WebURLResponse(ResourceResponse*); |
|
kinuko
2016/07/11 03:44:12
Put this inside #if INSIDE_BLINK ?
Adam Rice
2016/07/11 05:44:18
Done.
| |
| 300 | 299 |
| 301 private: | 300 private: |
| 302 // If this instance owns WebURLResponsePrivate |m_owningPrivate| is | 301 struct ResourceResponseContainer; |
| 303 // non-null and is pointed by |m_private|. | 302 |
| 304 std::unique_ptr<WebURLResponsePrivate> m_owningPrivate; | 303 // If this instance owns a ResourceResponse then |m_ownedResourceResponse| |
| 304 // is non-null and |m_resourceResponse| points to the ResourceResponse | |
| 305 // instance it contains. | |
| 306 std::unique_ptr<ResourceResponseContainer> m_ownedResourceResponse; | |
| 305 | 307 |
| 306 // Should never be null. | 308 // Should never be null. |
| 307 WebURLResponsePrivate* m_private; | 309 ResourceResponse* m_resourceResponse; |
| 308 }; | 310 }; |
| 309 | 311 |
| 310 } // namespace blink | 312 } // namespace blink |
| 311 | 313 |
| 312 #endif | 314 #endif |
| OLD | NEW |