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

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