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

Unified Diff: third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.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/platform/fonts/GlyphMetricsMap.h
diff --git a/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h b/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
index b5e412d014e1e578b713ddb0dcb90987c34cb051..f4225f09eb345b9b8d9ee8fac903cd5a86975d99 100644
--- a/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
+++ b/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
@@ -34,9 +34,9 @@
#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
#include "wtf/HashMap.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/Unicode.h"
+#include <memory>
namespace blink {
@@ -93,7 +93,7 @@ private:
bool m_filledPrimaryPage;
GlyphMetricsPage m_primaryPage; // We optimize for the page that contains glyph indices 0-255.
- OwnPtr<HashMap<int, OwnPtr<GlyphMetricsPage>>> m_pages;
+ std::unique_ptr<HashMap<int, std::unique_ptr<GlyphMetricsPage>>> m_pages;
};
template<> inline float GlyphMetricsMap<float>::unknownMetrics()
@@ -119,10 +119,10 @@ template<class T> typename GlyphMetricsMap<T>::GlyphMetricsPage* GlyphMetricsMap
if (page)
return page;
} else {
- m_pages = adoptPtr(new HashMap<int, OwnPtr<GlyphMetricsPage>>);
+ m_pages = wrapUnique(new HashMap<int, std::unique_ptr<GlyphMetricsPage>>);
}
page = new GlyphMetricsPage;
- m_pages->set(pageNumber, adoptPtr(page));
+ m_pages->set(pageNumber, wrapUnique(page));
}
// Fill in the whole page with the unknown glyph information.

Powered by Google App Engine
This is Rietveld 408576698