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

Unified Diff: third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: handleEvent -> invoke and other review nits Created 4 years, 5 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/DOMFileSystem.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
index ce734f44450c8f80bd74d426ae56e4a5dbaafd6f..79551d0bc7fbb2fbe00bec871c7ab2a6d5b423fa 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
@@ -33,7 +33,6 @@
#include "core/fileapi/BlobCallback.h"
#include "modules/filesystem/DOMFilePath.h"
#include "modules/filesystem/DirectoryEntry.h"
-#include "modules/filesystem/ErrorCallback.h"
#include "modules/filesystem/FileEntry.h"
#include "modules/filesystem/FileSystemCallbacks.h"
#include "modules/filesystem/FileWriter.h"
@@ -115,15 +114,15 @@ bool DOMFileSystem::hasPendingActivity() const
return m_numberOfPendingCallbacks;
}
-void DOMFileSystem::reportError(ErrorCallback* errorCallback, FileError* fileError)
+void DOMFileSystem::reportError(ErrorCallbackBase* errorCallback, FileError::ErrorCode fileError)
{
reportError(getExecutionContext(), errorCallback, fileError);
}
-void DOMFileSystem::reportError(ExecutionContext* executionContext, ErrorCallback* errorCallback, FileError* fileError)
+void DOMFileSystem::reportError(ExecutionContext* executionContext, ErrorCallbackBase* errorCallback, FileError::ErrorCode fileError)
{
if (errorCallback)
- scheduleCallback(executionContext, createSameThreadTask(&ErrorCallback::handleEvent, wrapPersistent(errorCallback), wrapPersistent(fileError)));
+ scheduleCallback(executionContext, createSameThreadTask(&ErrorCallbackBase::invoke, wrapPersistent(errorCallback), fileError));
}
namespace {
@@ -155,12 +154,12 @@ private:
} // namespace
-void DOMFileSystem::createWriter(const FileEntry* fileEntry, FileWriterCallback* successCallback, ErrorCallback* errorCallback)
+void DOMFileSystem::createWriter(const FileEntry* fileEntry, FileWriterCallback* successCallback, ErrorCallbackBase* errorCallback)
{
ASSERT(fileEntry);
if (!fileSystem()) {
- reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
+ reportError(errorCallback, FileError::ABORT_ERR);
return;
}
@@ -170,11 +169,11 @@ void DOMFileSystem::createWriter(const FileEntry* fileEntry, FileWriterCallback*
fileSystem()->createFileWriter(createFileSystemURL(fileEntry), fileWriter, std::move(callbacks));
}
-void DOMFileSystem::createFile(const FileEntry* fileEntry, BlobCallback* successCallback, ErrorCallback* errorCallback)
+void DOMFileSystem::createFile(const FileEntry* fileEntry, BlobCallback* successCallback, ErrorCallbackBase* errorCallback)
{
KURL fileSystemURL = createFileSystemURL(fileEntry);
if (!fileSystem()) {
- reportError(errorCallback, FileError::create(FileError::ABORT_ERR));
+ reportError(errorCallback, FileError::ABORT_ERR);
return;
}

Powered by Google App Engine
This is Rietveld 408576698