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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/FontCustomPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
index c38d495fb0f6809f566002237f28cbc670b137f4..5b80c62a6e485f9da6aee3476525e39a3e06428c 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
@@ -39,8 +39,7 @@
#include "platform/fonts/WebFontDecoder.h"
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTypeface.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -57,7 +56,7 @@ FontPlatformData FontCustomPlatformData::fontPlatformData(float size, bool bold,
return FontPlatformData(m_typeface.get(), "", size, bold && !m_typeface->isBold(), italic && !m_typeface->isItalic(), orientation);
}
-std::unique_ptr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer, String& otsParseMessage)
+PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer, String& otsParseMessage)
{
DCHECK(buffer);
WebFontDecoder decoder;
@@ -66,7 +65,7 @@ std::unique_ptr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuf
otsParseMessage = decoder.getErrorString();
return nullptr;
}
- return wrapUnique(new FontCustomPlatformData(typeface.release()));
+ return adoptPtr(new FontCustomPlatformData(typeface.release()));
}
bool FontCustomPlatformData::supportsFormat(const String& format)

Powered by Google App Engine
This is Rietveld 408576698