Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebBlobData.cpp

Issue 2143323002: Remove WebPrivateOwnPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/exported/WebFont.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
35 #include <memory> 35 #include <memory>
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);
46 } 45 }
47 46
48 size_t WebBlobData::itemCount() const 47 size_t WebBlobData::itemCount() const
49 { 48 {
50 ASSERT(!isNull()); 49 ASSERT(!isNull());
51 return m_private->items().size(); 50 return m_private->items().size();
52 } 51 }
53 52
54 bool WebBlobData::itemAt(size_t index, Item& result) const 53 bool WebBlobData::itemAt(size_t index, Item& result) const
55 { 54 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return m_private->contentType(); 93 return m_private->contentType();
95 } 94 }
96 95
97 WebBlobData::WebBlobData(std::unique_ptr<BlobData> data) 96 WebBlobData::WebBlobData(std::unique_ptr<BlobData> data)
98 : m_private(std::move(data)) 97 : m_private(std::move(data))
99 { 98 {
100 } 99 }
101 100
102 WebBlobData& WebBlobData::operator=(std::unique_ptr<BlobData> data) 101 WebBlobData& WebBlobData::operator=(std::unique_ptr<BlobData> data)
103 { 102 {
104 m_private.reset(std::move(data)); 103 m_private = std::move(data);
105 return *this; 104 return *this;
106 } 105 }
107 106
108 WebBlobData::operator std::unique_ptr<BlobData>() 107 WebBlobData::operator std::unique_ptr<BlobData>()
109 { 108 {
110 return m_private.release(); 109 return std::move(m_private);
111 } 110 }
112 111
113 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/exported/WebFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698