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

Unified Diff: third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.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/DOMWindowFileSystem.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
index 5eee230d9f853d493a0cbe3b6b7d6d4107a6a2c2..fcfb42ff923e6123c1f6d4253d120fbc919e699d 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
@@ -55,17 +55,17 @@ void DOMWindowFileSystem::webkitRequestFileSystem(DOMWindow& windowArg, int type
UseCounter::count(document, UseCounter::RequestFileSystemNonWebbyOrigin);
if (!document->getSecurityOrigin()->canAccessFileSystem()) {
- DOMFileSystem::reportError(document, errorCallback, FileError::create(FileError::SECURITY_ERR));
+ DOMFileSystem::reportError(document, ScriptErrorCallback::wrap(errorCallback), FileError::SECURITY_ERR);
return;
}
FileSystemType fileSystemType = static_cast<FileSystemType>(type);
if (!DOMFileSystemBase::isValidType(fileSystemType)) {
- DOMFileSystem::reportError(document, errorCallback, FileError::create(FileError::INVALID_MODIFICATION_ERR));
+ DOMFileSystem::reportError(document, ScriptErrorCallback::wrap(errorCallback), FileError::INVALID_MODIFICATION_ERR);
return;
}
- LocalFileSystem::from(*document)->requestFileSystem(document, fileSystemType, size, FileSystemCallbacks::create(successCallback, errorCallback, document, fileSystemType));
+ LocalFileSystem::from(*document)->requestFileSystem(document, fileSystemType, size, FileSystemCallbacks::create(successCallback, ScriptErrorCallback::wrap(errorCallback), document, fileSystemType));
}
void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(DOMWindow& windowArg, const String& url, EntryCallback* successCallback, ErrorCallback* errorCallback)
@@ -81,16 +81,16 @@ void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(DOMWindow& windowArg,
SecurityOrigin* securityOrigin = document->getSecurityOrigin();
KURL completedURL = document->completeURL(url);
if (!securityOrigin->canAccessFileSystem() || !securityOrigin->canRequest(completedURL)) {
- DOMFileSystem::reportError(document, errorCallback, FileError::create(FileError::SECURITY_ERR));
+ DOMFileSystem::reportError(document, ScriptErrorCallback::wrap(errorCallback), FileError::SECURITY_ERR);
return;
}
if (!completedURL.isValid()) {
- DOMFileSystem::reportError(document, errorCallback, FileError::create(FileError::ENCODING_ERR));
+ DOMFileSystem::reportError(document, ScriptErrorCallback::wrap(errorCallback), FileError::ENCODING_ERR);
return;
}
- LocalFileSystem::from(*document)->resolveURL(document, completedURL, ResolveURICallbacks::create(successCallback, errorCallback, document));
+ LocalFileSystem::from(*document)->resolveURL(document, completedURL, ResolveURICallbacks::create(successCallback, ScriptErrorCallback::wrap(errorCallback), document));
}
static_assert(static_cast<int>(DOMWindowFileSystem::TEMPORARY) == static_cast<int>(FileSystemTypeTemporary), "DOMWindowFileSystem::TEMPORARY should match FileSystemTypeTemporary");

Powered by Google App Engine
This is Rietveld 408576698