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

Unified Diff: third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.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/modules/filesystem/DOMFileSystemSync.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
index c5f2012cc7b0b6664044ca5e80a323b8378ed42f..e57da4dc304375ac792950332294b35ecc4c4b28 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
@@ -43,6 +43,8 @@
#include "platform/FileMetadata.h"
#include "public/platform/WebFileSystem.h"
#include "public/platform/WebFileSystemCallbacks.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -101,9 +103,9 @@ public:
}
};
- static PassOwnPtr<AsyncFileSystemCallbacks> create(CreateFileResult* result, const String& name, const KURL& url, FileSystemType type)
+ static std::unique_ptr<AsyncFileSystemCallbacks> create(CreateFileResult* result, const String& name, const KURL& url, FileSystemType type)
{
- return adoptPtr(static_cast<AsyncFileSystemCallbacks*>(new CreateFileHelper(result, name, url, type)));
+ return wrapUnique(static_cast<AsyncFileSystemCallbacks*>(new CreateFileHelper(result, name, url, type)));
}
void didFail(int code) override
@@ -212,7 +214,7 @@ FileWriterSync* DOMFileSystemSync::createWriter(const FileEntrySync* fileEntry,
FileError::ErrorCode errorCode = FileError::OK;
LocalErrorCallback* errorCallback = LocalErrorCallback::create(errorCode);
- OwnPtr<AsyncFileSystemCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, successCallback, errorCallback, m_context);
+ std::unique_ptr<AsyncFileSystemCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, successCallback, errorCallback, m_context);
callbacks->setShouldBlockUntilCompletion(true);
fileSystem()->createFileWriter(createFileSystemURL(fileEntry), fileWriter, std::move(callbacks));

Powered by Google App Engine
This is Rietveld 408576698