| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "public/platform/WebBlobData.h" | 32 #include "public/platform/WebBlobData.h" |
| 33 | 33 |
| 34 #include "platform/blob/BlobData.h" | 34 #include "platform/blob/BlobData.h" |
| 35 #include <memory> | 35 #include "wtf/PassOwnPtr.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 WebBlobData::WebBlobData() | 39 WebBlobData::WebBlobData() |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 WebBlobData::~WebBlobData() | 43 WebBlobData::~WebBlobData() |
| 44 { | 44 { |
| 45 m_private.reset(0); | 45 m_private.reset(0); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 ASSERT_NOT_REACHED(); | 87 ASSERT_NOT_REACHED(); |
| 88 return false; | 88 return false; |
| 89 } | 89 } |
| 90 | 90 |
| 91 WebString WebBlobData::contentType() const | 91 WebString WebBlobData::contentType() const |
| 92 { | 92 { |
| 93 ASSERT(!isNull()); | 93 ASSERT(!isNull()); |
| 94 return m_private->contentType(); | 94 return m_private->contentType(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 WebBlobData::WebBlobData(std::unique_ptr<BlobData> data) | 97 WebBlobData::WebBlobData(PassOwnPtr<BlobData> data) |
| 98 : m_private(std::move(data)) | 98 : m_private(std::move(data)) |
| 99 { | 99 { |
| 100 } | 100 } |
| 101 | 101 |
| 102 WebBlobData& WebBlobData::operator=(std::unique_ptr<BlobData> data) | 102 WebBlobData& WebBlobData::operator=(PassOwnPtr<BlobData> data) |
| 103 { | 103 { |
| 104 m_private.reset(std::move(data)); | 104 m_private.reset(std::move(data)); |
| 105 return *this; | 105 return *this; |
| 106 } | 106 } |
| 107 | 107 |
| 108 WebBlobData::operator std::unique_ptr<BlobData>() | 108 WebBlobData::operator PassOwnPtr<BlobData>() |
| 109 { | 109 { |
| 110 return m_private.release(); | 110 return m_private.release(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |