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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleWin.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/LocaleWin.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleWin.cpp b/third_party/WebKit/Source/platform/text/LocaleWin.cpp
index 35a6ec7e8a8115e8ff44a18bc4c2d5e4bbd05ae8..cdbd1b77336d72b6d9256924617086cb133c7cbd 100644
--- a/third_party/WebKit/Source/platform/text/LocaleWin.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleWin.cpp
@@ -30,7 +30,6 @@
#include "platform/text/LocaleWin.h"
-#include <limits>
#include "platform/DateComponents.h"
#include "platform/Language.h"
#include "platform/LayoutTestSupport.h"
@@ -38,11 +37,12 @@
#include "wtf/CurrentTime.h"
#include "wtf/DateMath.h"
#include "wtf/HashMap.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/StringBuffer.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/StringHash.h"
+#include <limits>
+#include <memory>
namespace blink {
@@ -76,7 +76,7 @@ static LCID LCIDFromLocale(const String& locale, bool defaultsForLocale)
return lcid;
}
-PassOwnPtr<Locale> Locale::create(const String& locale)
+std::unique_ptr<Locale> Locale::create(const String& locale)
{
// Whether the default settings for the locale should be used, ignoring user overrides.
bool defaultsForLocale = LayoutTestSupport::isRunningLayoutTest();
@@ -95,9 +95,9 @@ inline LocaleWin::LocaleWin(LCID lcid, bool defaultsForLocale)
m_firstDayOfWeek = (value + 1) % 7;
}
-PassOwnPtr<LocaleWin> LocaleWin::create(LCID lcid, bool defaultsForLocale)
+std::unique_ptr<LocaleWin> LocaleWin::create(LCID lcid, bool defaultsForLocale)
{
- return adoptPtr(new LocaleWin(lcid, defaultsForLocale));
+ return wrapUnique(new LocaleWin(lcid, defaultsForLocale));
}
LocaleWin::~LocaleWin()
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleWin.h ('k') | third_party/WebKit/Source/platform/text/LocaleWinTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698