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

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

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/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 3f14d83622c1ff9aed0f48859dc44388be748a93..26ff434bdcc0dc8896090080c8b8f037fced8b2a 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
@@ -41,9 +41,7 @@
#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
@@ -204,7 +202,7 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescri
return getFontData(fontDescription, lucidaGrandeStr, false, shouldRetain);
}
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription,
+PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription,
const FontFaceCreationParams& creationParams, float fontSize)
{
NSFontTraitMask traits = fontDescription.style() ? NSFontItalicTrait : 0;
@@ -234,7 +232,7 @@ std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDe
// 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.
- std::unique_ptr<FontPlatformData> platformData = wrapUnique(new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
+ OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
if (!platformData->typeface()) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698