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

Unified Diff: third_party/WebKit/Source/core/style/ContentData.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ContentData.h
diff --git a/third_party/WebKit/Source/core/style/ContentData.h b/third_party/WebKit/Source/core/style/ContentData.h
index 683319ddfc86a9d2786eaa7b5dc7cbdb3d0020f7..4ed54df664b807c430011efedd113ee4ba8c9aac 100644
--- a/third_party/WebKit/Source/core/style/ContentData.h
+++ b/third_party/WebKit/Source/core/style/ContentData.h
@@ -27,8 +27,8 @@
#include "core/style/CounterContent.h"
#include "core/style/StyleImage.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -40,7 +40,7 @@ class ContentData : public GarbageCollectedFinalized<ContentData> {
public:
static ContentData* create(StyleImage*);
static ContentData* create(const String&);
- static ContentData* create(PassOwnPtr<CounterContent>);
+ static ContentData* create(std::unique_ptr<CounterContent>);
static ContentData* create(QuoteType);
virtual ~ContentData() { }
@@ -140,20 +140,20 @@ class CounterContentData final : public ContentData {
friend class ContentData;
public:
const CounterContent* counter() const { return m_counter.get(); }
- void setCounter(PassOwnPtr<CounterContent> counter) { m_counter = std::move(counter); }
+ void setCounter(std::unique_ptr<CounterContent> counter) { m_counter = std::move(counter); }
bool isCounter() const override { return true; }
LayoutObject* createLayoutObject(Document&, ComputedStyle&) const override;
private:
- CounterContentData(PassOwnPtr<CounterContent> counter)
+ CounterContentData(std::unique_ptr<CounterContent> counter)
: m_counter(std::move(counter))
{
}
ContentData* cloneInternal() const override
{
- OwnPtr<CounterContent> counterData = adoptPtr(new CounterContent(*counter()));
+ std::unique_ptr<CounterContent> counterData = wrapUnique(new CounterContent(*counter()));
return create(std::move(counterData));
}
@@ -164,7 +164,7 @@ private:
return *static_cast<const CounterContentData&>(data).counter() == *counter();
}
- OwnPtr<CounterContent> m_counter;
+ std::unique_ptr<CounterContent> m_counter;
};
DEFINE_CONTENT_DATA_TYPE_CASTS(Counter);
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/ContentData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698