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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleMac.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/text/LocaleMac.mm
diff --git a/third_party/WebKit/Source/platform/text/LocaleMac.mm b/third_party/WebKit/Source/platform/text/LocaleMac.mm
index 9a225b9144de22725d5b61b0ca3bcccdecba5d27..39c762f2e65bd9078341488403230699aa93d3ef 100644
--- a/third_party/WebKit/Source/platform/text/LocaleMac.mm
+++ b/third_party/WebKit/Source/platform/text/LocaleMac.mm
@@ -35,10 +35,9 @@
#include "platform/Language.h"
#include "platform/LayoutTestSupport.h"
#include "wtf/DateMath.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/RetainPtr.h"
#include "wtf/text/StringBuilder.h"
-#include <memory>
namespace blink {
@@ -65,7 +64,7 @@ static RetainPtr<NSLocale> determineLocale(const String& locale)
return RetainPtr<NSLocale>(AdoptNS, [[NSLocale alloc] initWithLocaleIdentifier:locale]);
}
-std::unique_ptr<Locale> Locale::create(const String& locale)
+PassOwnPtr<Locale> Locale::create(const String& locale)
{
return LocaleMac::create(determineLocale(locale).get());
}
@@ -98,15 +97,15 @@ LocaleMac::~LocaleMac()
{
}
-std::unique_ptr<LocaleMac> LocaleMac::create(const String& localeIdentifier)
+PassOwnPtr<LocaleMac> LocaleMac::create(const String& localeIdentifier)
{
RetainPtr<NSLocale> locale = [[NSLocale alloc] initWithLocaleIdentifier:localeIdentifier];
- return wrapUnique(new LocaleMac(locale.get()));
+ return adoptPtr(new LocaleMac(locale.get()));
}
-std::unique_ptr<LocaleMac> LocaleMac::create(NSLocale* locale)
+PassOwnPtr<LocaleMac> LocaleMac::create(NSLocale* locale)
{
- return wrapUnique(new LocaleMac(locale));
+ return adoptPtr(new LocaleMac(locale));
}
RetainPtr<NSDateFormatter> LocaleMac::shortDateFormatter()
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleMac.h ('k') | third_party/WebKit/Source/platform/text/LocaleMacTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698