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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleICUTest.cpp

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/text/LocaleICUTest.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleICUTest.cpp b/third_party/WebKit/Source/platform/text/LocaleICUTest.cpp
index 256467bcfa46319c83671d9826c55652006513d3..ff5e2b55dde41dff48dadcd68dae482250b46f53 100644
--- a/third_party/WebKit/Source/platform/text/LocaleICUTest.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleICUTest.cpp
@@ -31,8 +31,8 @@
#include "platform/text/LocaleICU.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/text/StringBuilder.h"
+#include <memory>
#include <unicode/uvernum.h>
namespace blink {
@@ -89,49 +89,49 @@ protected:
String monthFormat(const char* localeString)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->monthFormat();
}
String localizedDateFormatText(const char* localeString)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->timeFormat();
}
String localizedShortDateFormatText(const char* localeString)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->shortTimeFormat();
}
String shortMonthLabel(const char* localeString, unsigned index)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->shortMonthLabels()[index];
}
String shortStandAloneMonthLabel(const char* localeString, unsigned index)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->shortStandAloneMonthLabels()[index];
}
String standAloneMonthLabel(const char* localeString, unsigned index)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->standAloneMonthLabels()[index];
}
Labels timeAMPMLabels(const char* localeString)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return Labels(locale->timeAMPMLabels());
}
bool isRTL(const char* localeString)
{
- OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ std::unique_ptr<LocaleICU> locale = LocaleICU::create(localeString);
return locale->isRTL();
}
};
@@ -237,7 +237,7 @@ TEST_F(LocaleICUTest, timeAMPMLabels)
static String testDecimalSeparator(const AtomicString& localeIdentifier)
{
- OwnPtr<Locale> locale = Locale::create(localeIdentifier);
+ std::unique_ptr<Locale> locale = Locale::create(localeIdentifier);
return locale->localizedDecimalSeparator();
}
@@ -249,7 +249,7 @@ TEST_F(LocaleICUTest, localizedDecimalSeparator)
void testNumberIsReversible(const AtomicString& localeIdentifier, const char* original, const char* shouldHave = 0)
{
- OwnPtr<Locale> locale = Locale::create(localeIdentifier);
+ std::unique_ptr<Locale> locale = Locale::create(localeIdentifier);
String localized = locale->convertToLocalizedNumber(original);
if (shouldHave)
EXPECT_TRUE(localized.contains(shouldHave));
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleICU.cpp ('k') | third_party/WebKit/Source/platform/text/LocaleMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698