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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutCounter.cpp

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/layout/LayoutCounter.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutCounter.cpp b/third_party/WebKit/Source/core/layout/LayoutCounter.cpp
index 8f48f651defac3d1bec976563da1272c11109902..d6526930340f9b058b4029257ca75def67fe3509 100644
--- a/third_party/WebKit/Source/core/layout/LayoutCounter.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutCounter.cpp
@@ -30,7 +30,9 @@
#include "core/layout/LayoutView.h"
#include "core/layout/ListMarkerText.h"
#include "core/style/ComputedStyle.h"
+#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
+#include <memory>
#ifndef NDEBUG
#include <stdio.h>
@@ -41,7 +43,7 @@ namespace blink {
using namespace HTMLNames;
typedef HashMap<AtomicString, RefPtr<CounterNode>> CounterMap;
-typedef HashMap<const LayoutObject*, OwnPtr<CounterMap>> CounterMaps;
+typedef HashMap<const LayoutObject*, std::unique_ptr<CounterMap>> CounterMaps;
static CounterNode* makeCounterNodeIfNeeded(LayoutObject&, const AtomicString& identifier, bool alwaysCreateCounter);
@@ -339,7 +341,7 @@ static CounterNode* makeCounterNodeIfNeeded(LayoutObject& object, const AtomicSt
nodeMap = counterMaps().get(&object);
} else {
nodeMap = new CounterMap;
- counterMaps().set(&object, adoptPtr(nodeMap));
+ counterMaps().set(&object, wrapUnique(nodeMap));
object.setHasCounterNodeMap(true);
}
nodeMap->set(identifier, newNode);

Powered by Google App Engine
This is Rietveld 408576698