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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp

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/wtf/text/TextCodecUTF16.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
index f3e2c12b61ea5457757fcdd718dd896a57f32497..6fc1f15a2df3867d4294cf5e13e0b588cf4c266e 100644
--- a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
+++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
@@ -25,12 +25,11 @@
#include "wtf/text/TextCodecUTF16.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/text/CString.h"
#include "wtf/text/CharacterNames.h"
#include "wtf/text/StringBuffer.h"
#include "wtf/text/WTFString.h"
-#include <memory>
using namespace std;
@@ -51,14 +50,14 @@ void TextCodecUTF16::registerEncodingNames(EncodingNameRegistrar registrar)
registrar("unicodeFFFE", "UTF-16BE");
}
-static std::unique_ptr<TextCodec> newStreamingTextDecoderUTF16LE(const TextEncoding&, const void*)
+static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16LE(const TextEncoding&, const void*)
{
- return wrapUnique(new TextCodecUTF16(true));
+ return adoptPtr(new TextCodecUTF16(true));
}
-static std::unique_ptr<TextCodec> newStreamingTextDecoderUTF16BE(const TextEncoding&, const void*)
+static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16BE(const TextEncoding&, const void*)
{
- return wrapUnique(new TextCodecUTF16(false));
+ return adoptPtr(new TextCodecUTF16(false));
}
void TextCodecUTF16::registerCodecs(TextCodecRegistrar registrar)
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecReplacementTest.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodecUTF8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698