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

Unified Diff: third_party/WebKit/Source/wtf/FilePrintStream.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
« no previous file with comments | « third_party/WebKit/Source/wtf/FilePrintStream.h ('k') | third_party/WebKit/Source/wtf/Forward.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/FilePrintStream.cpp
diff --git a/third_party/WebKit/Source/wtf/FilePrintStream.cpp b/third_party/WebKit/Source/wtf/FilePrintStream.cpp
index d248c8c7701ef7944f8ff5c9fcf616e1b1797bce..c967e8a85ea2abd7a794345c61820b83f19c65c6 100644
--- a/third_party/WebKit/Source/wtf/FilePrintStream.cpp
+++ b/third_party/WebKit/Source/wtf/FilePrintStream.cpp
@@ -25,6 +25,9 @@
#include "wtf/FilePrintStream.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
+
namespace WTF {
FilePrintStream::FilePrintStream(FILE* file, AdoptionMode adoptionMode)
@@ -40,13 +43,13 @@ FilePrintStream::~FilePrintStream()
fclose(m_file);
}
-PassOwnPtr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
+std::unique_ptr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
{
FILE* file = fopen(filename, mode);
if (!file)
- return PassOwnPtr<FilePrintStream>();
+ return std::unique_ptr<FilePrintStream>();
- return adoptPtr(new FilePrintStream(file));
+ return wrapUnique(new FilePrintStream(file));
}
void FilePrintStream::vprintf(const char* format, va_list argList)
« no previous file with comments | « third_party/WebKit/Source/wtf/FilePrintStream.h ('k') | third_party/WebKit/Source/wtf/Forward.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698