| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 WebURLRequest::ExtraData* extraData) { | 52 WebURLRequest::ExtraData* extraData) { |
| 53 return adoptRef(new ExtraDataContainer(extraData)); | 53 return adoptRef(new ExtraDataContainer(extraData)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 ~ExtraDataContainer() override {} | 56 ~ExtraDataContainer() override {} |
| 57 | 57 |
| 58 WebURLRequest::ExtraData* getExtraData() const { return m_extraData.get(); } | 58 WebURLRequest::ExtraData* getExtraData() const { return m_extraData.get(); } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) | 61 explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData) |
| 62 : m_extraData(wrapUnique(extraData)) {} | 62 : m_extraData(WTF::wrapUnique(extraData)) {} |
| 63 | 63 |
| 64 std::unique_ptr<WebURLRequest::ExtraData> m_extraData; | 64 std::unique_ptr<WebURLRequest::ExtraData> m_extraData; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace | 67 } // namespace |
| 68 | 68 |
| 69 // The purpose of this struct is to permit allocating a ResourceRequest on the | 69 // The purpose of this struct is to permit allocating a ResourceRequest on the |
| 70 // heap, which is otherwise disallowed by DISALLOW_NEW_EXCEPT_PLACEMENT_NEW | 70 // heap, which is otherwise disallowed by DISALLOW_NEW_EXCEPT_PLACEMENT_NEW |
| 71 // annotation on ResourceRequest. | 71 // annotation on ResourceRequest. |
| 72 struct WebURLRequest::ResourceRequestContainer { | 72 struct WebURLRequest::ResourceRequestContainer { |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 422 } |
| 423 | 423 |
| 424 const ResourceRequest& WebURLRequest::toResourceRequest() const { | 424 const ResourceRequest& WebURLRequest::toResourceRequest() const { |
| 425 DCHECK(m_resourceRequest); | 425 DCHECK(m_resourceRequest); |
| 426 return *m_resourceRequest; | 426 return *m_resourceRequest; |
| 427 } | 427 } |
| 428 | 428 |
| 429 WebURLRequest::WebURLRequest(ResourceRequest& r) : m_resourceRequest(&r) {} | 429 WebURLRequest::WebURLRequest(ResourceRequest& r) : m_resourceRequest(&r) {} |
| 430 | 430 |
| 431 } // namespace blink | 431 } // namespace blink |
| OLD | NEW |