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

Unified Diff: third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.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/WorkerGlobalScopeFileSystem.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
index b13018d5858cfbf27f3424b4abc57149efe0f4d6..56687bef815a9c8923db0a739dba581e70816f03 100644
--- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
@@ -49,17 +49,17 @@ void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(WorkerGlobalScope& wor
{
ExecutionContext* secureContext = worker.getExecutionContext();
if (!secureContext->getSecurityOrigin()->canAccessFileSystem()) {
- DOMFileSystem::reportError(&worker, errorCallback, FileError::create(FileError::SECURITY_ERR));
+ DOMFileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback), FileError::SECURITY_ERR);
return;
}
FileSystemType fileSystemType = static_cast<FileSystemType>(type);
if (!DOMFileSystemBase::isValidType(fileSystemType)) {
- DOMFileSystem::reportError(&worker, errorCallback, FileError::create(FileError::INVALID_MODIFICATION_ERR));
+ DOMFileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback), FileError::INVALID_MODIFICATION_ERR);
return;
}
- LocalFileSystem::from(worker)->requestFileSystem(&worker, fileSystemType, size, FileSystemCallbacks::create(successCallback, errorCallback, &worker, fileSystemType));
+ LocalFileSystem::from(worker)->requestFileSystem(&worker, fileSystemType, size, FileSystemCallbacks::create(successCallback, ScriptErrorCallback::wrap(errorCallback), &worker, fileSystemType));
}
DOMFileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(WorkerGlobalScope& worker, int type, long long size, ExceptionState& exceptionState)
@@ -89,16 +89,16 @@ void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalSc
KURL completedURL = worker.completeURL(url);
ExecutionContext* secureContext = worker.getExecutionContext();
if (!secureContext->getSecurityOrigin()->canAccessFileSystem() || !secureContext->getSecurityOrigin()->canRequest(completedURL)) {
- DOMFileSystem::reportError(&worker, errorCallback, FileError::create(FileError::SECURITY_ERR));
+ DOMFileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback), FileError::SECURITY_ERR);
return;
}
if (!completedURL.isValid()) {
- DOMFileSystem::reportError(&worker, errorCallback, FileError::create(FileError::ENCODING_ERR));
+ DOMFileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback), FileError::ENCODING_ERR);
return;
}
- LocalFileSystem::from(worker)->resolveURL(&worker, completedURL, ResolveURICallbacks::create(successCallback, errorCallback, &worker));
+ LocalFileSystem::from(worker)->resolveURL(&worker, completedURL, ResolveURICallbacks::create(successCallback, ScriptErrorCallback::wrap(errorCallback), &worker));
}
EntrySync* WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL(WorkerGlobalScope& worker, const String& url, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698