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

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

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 392bfa072fbb9479ce43f448f015c430315f6eb4..b0003ac8107acf2879207a431d823b3ad146b783 100644
--- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
@@ -31,12 +31,12 @@
#include "core/dom/ExceptionCode.h"
#include "core/fileapi/FileError.h"
#include "core/workers/WorkerGlobalScope.h"
-#include "modules/filesystem/DOMFileSystemBase.h"
-#include "modules/filesystem/DirectoryEntrySync.h"
#include "modules/filesystem/ErrorCallback.h"
-#include "modules/filesystem/FileEntrySync.h"
+#include "modules/filesystem/FileSystemBase.h"
#include "modules/filesystem/FileSystemCallback.h"
#include "modules/filesystem/FileSystemCallbacks.h"
+#include "modules/filesystem/FileSystemDirectoryEntrySync.h"
+#include "modules/filesystem/FileSystemFileEntrySync.h"
#include "modules/filesystem/LocalFileSystem.h"
#include "modules/filesystem/SyncCallbackHelper.h"
#include "platform/FileSystemType.h"
@@ -53,17 +53,15 @@ void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(
ErrorCallback* errorCallback) {
ExecutionContext* secureContext = worker.getExecutionContext();
if (!secureContext->getSecurityOrigin()->canAccessFileSystem()) {
- DOMFileSystem::reportError(&worker,
- ScriptErrorCallback::wrap(errorCallback),
- FileError::kSecurityErr);
+ FileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback),
+ FileError::kSecurityErr);
return;
}
FileSystemType fileSystemType = static_cast<FileSystemType>(type);
- if (!DOMFileSystemBase::isValidType(fileSystemType)) {
- DOMFileSystem::reportError(&worker,
- ScriptErrorCallback::wrap(errorCallback),
- FileError::kInvalidModificationErr);
+ if (!FileSystemBase::isValidType(fileSystemType)) {
+ FileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback),
+ FileError::kInvalidModificationErr);
return;
}
@@ -74,7 +72,7 @@ void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(
&worker, fileSystemType));
}
-DOMFileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(
+FileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(
WorkerGlobalScope& worker,
int type,
long long size,
@@ -86,7 +84,7 @@ DOMFileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(
}
FileSystemType fileSystemType = static_cast<FileSystemType>(type);
- if (!DOMFileSystemBase::isValidType(fileSystemType)) {
+ if (!FileSystemBase::isValidType(fileSystemType)) {
exceptionState.throwDOMException(
InvalidModificationError,
"the type must be kTemporary or kPersistent.");
@@ -108,22 +106,20 @@ DOMFileSystemSync* WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync(
void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(
WorkerGlobalScope& worker,
const String& url,
- EntryCallback* successCallback,
+ FileSystemEntryCallback* successCallback,
ErrorCallback* errorCallback) {
KURL completedURL = worker.completeURL(url);
ExecutionContext* secureContext = worker.getExecutionContext();
if (!secureContext->getSecurityOrigin()->canAccessFileSystem() ||
!secureContext->getSecurityOrigin()->canRequest(completedURL)) {
- DOMFileSystem::reportError(&worker,
- ScriptErrorCallback::wrap(errorCallback),
- FileError::kSecurityErr);
+ FileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback),
+ FileError::kSecurityErr);
return;
}
if (!completedURL.isValid()) {
- DOMFileSystem::reportError(&worker,
- ScriptErrorCallback::wrap(errorCallback),
- FileError::kEncodingErr);
+ FileSystem::reportError(&worker, ScriptErrorCallback::wrap(errorCallback),
+ FileError::kEncodingErr);
return;
}
@@ -133,7 +129,8 @@ void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(
successCallback, ScriptErrorCallback::wrap(errorCallback), &worker));
}
-EntrySync* WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL(
+FileSystemEntrySync*
+WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL(
WorkerGlobalScope& worker,
const String& url,
ExceptionState& exceptionState) {

Powered by Google App Engine
This is Rietveld 408576698