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

Unified Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

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/mac/FontCacheMac.mm
diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
index 26ff434bdcc0dc8896090080c8b8f037fced8b2a..3f14d83622c1ff9aed0f48859dc44388be748a93 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
@@ -41,7 +41,9 @@
#include "public/platform/WebTaskRunner.h"
#include "public/platform/WebTraceLocation.h"
#include "wtf/Functional.h"
+#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
+#include <memory>
// Forward declare Mac SPIs.
// Request for public API: rdar://13803570
@@ -202,7 +204,7 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescri
return getFontData(fontDescription, lucidaGrandeStr, false, shouldRetain);
}
-PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription,
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription,
const FontFaceCreationParams& creationParams, float fontSize)
{
NSFontTraitMask traits = fontDescription.style() ? NSFontItalicTrait : 0;
@@ -232,7 +234,7 @@ PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescrip
// Out-of-process loading occurs for registered fonts stored in non-system locations.
// When loading fails, we do not want to use the returned FontPlatformData since it will not have
// a valid SkTypeface.
- OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
+ std::unique_ptr<FontPlatformData> platformData = wrapUnique(new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
if (!platformData->typeface()) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698