| Index: third_party/WebKit/Source/modules/filesystem/FileSystemBase.h
|
| diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h b/third_party/WebKit/Source/modules/filesystem/FileSystemBase.h
|
| similarity index 76%
|
| rename from third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
|
| rename to third_party/WebKit/Source/modules/filesystem/FileSystemBase.h
|
| index 88df69218a11fb3f6dd24e99dfef16660b550a03..63caca7fb3129e1effe11d249695a9f68ee6d826 100644
|
| --- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
|
| +++ b/third_party/WebKit/Source/modules/filesystem/FileSystemBase.h
|
| @@ -28,8 +28,8 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef DOMFileSystemBase_h
|
| -#define DOMFileSystemBase_h
|
| +#ifndef FileSystemBase_h
|
| +#define FileSystemBase_h
|
|
|
| #include "core/fileapi/FileError.h"
|
| #include "modules/ModulesExport.h"
|
| @@ -45,21 +45,21 @@ class WebFileSystem;
|
|
|
| namespace blink {
|
|
|
| -class DirectoryReaderBase;
|
| -class EntriesCallback;
|
| -class EntryBase;
|
| -class EntryCallback;
|
| class ErrorCallbackBase;
|
| +class ExecutionContext;
|
| class File;
|
| class FileMetadata;
|
| -class MetadataCallback;
|
| -class ExecutionContext;
|
| +class FileSystemDirectoryReaderBase;
|
| +class FileSystemEntriesCallback;
|
| +class FileSystemEntryBase;
|
| +class FileSystemEntryCallback;
|
| +class FileSystemMetadataCallback;
|
| class SecurityOrigin;
|
| class VoidCallback;
|
|
|
| -// A common base class for DOMFileSystem and DOMFileSystemSync.
|
| -class MODULES_EXPORT DOMFileSystemBase
|
| - : public GarbageCollectedFinalized<DOMFileSystemBase> {
|
| +// A common base class for FileSystem and FileSystemSync.
|
| +class MODULES_EXPORT FileSystemBase
|
| + : public GarbageCollectedFinalized<FileSystemBase> {
|
| public:
|
| enum SynchronousType {
|
| Synchronous,
|
| @@ -73,7 +73,7 @@ class MODULES_EXPORT DOMFileSystemBase
|
| static const char isolatedPathPrefix[];
|
| static const char externalPathPrefix[];
|
|
|
| - virtual ~DOMFileSystemBase();
|
| + virtual ~FileSystemBase();
|
|
|
| // These are called when a new callback is created and resolved in
|
| // FileSystem API, so that subclasses can track the number of pending
|
| @@ -99,10 +99,10 @@ class MODULES_EXPORT DOMFileSystemBase
|
| static bool isValidType(FileSystemType);
|
| static KURL createFileSystemRootURL(const String& origin, FileSystemType);
|
| bool supportsToURL() const;
|
| - KURL createFileSystemURL(const EntryBase*) const;
|
| + KURL createFileSystemURL(const FileSystemEntryBase*) const;
|
| KURL createFileSystemURL(const String& fullPath) const;
|
| static bool pathToAbsolutePath(FileSystemType,
|
| - const EntryBase*,
|
| + const FileSystemEntryBase*,
|
| String path,
|
| String& absolutePath);
|
| static bool pathPrefixToFileSystemType(const String& pathPrefix,
|
| @@ -114,46 +114,48 @@ class MODULES_EXPORT DOMFileSystemBase
|
|
|
| // Actual FileSystem API implementations. All the validity checks on virtual
|
| // paths are done at this level.
|
| - void getMetadata(const EntryBase*,
|
| - MetadataCallback*,
|
| + void getMetadata(const FileSystemEntryBase*,
|
| + FileSystemMetadataCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void move(const EntryBase* source,
|
| - EntryBase* parent,
|
| + void move(const FileSystemEntryBase* source,
|
| + FileSystemEntryBase* parent,
|
| const String& name,
|
| - EntryCallback*,
|
| + FileSystemEntryCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void copy(const EntryBase* source,
|
| - EntryBase* parent,
|
| + void copy(const FileSystemEntryBase* source,
|
| + FileSystemEntryBase* parent,
|
| const String& name,
|
| - EntryCallback*,
|
| + FileSystemEntryCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void remove(const EntryBase*,
|
| + void remove(const FileSystemEntryBase*,
|
| VoidCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void removeRecursively(const EntryBase*,
|
| + void removeRecursively(const FileSystemEntryBase*,
|
| VoidCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void getParent(const EntryBase*, EntryCallback*, ErrorCallbackBase*);
|
| - void getFile(const EntryBase*,
|
| + void getParent(const FileSystemEntryBase*,
|
| + FileSystemEntryCallback*,
|
| + ErrorCallbackBase*);
|
| + void getFile(const FileSystemEntryBase*,
|
| const String& path,
|
| const FileSystemFlags&,
|
| - EntryCallback*,
|
| + FileSystemEntryCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - void getDirectory(const EntryBase*,
|
| + void getDirectory(const FileSystemEntryBase*,
|
| const String& path,
|
| const FileSystemFlags&,
|
| - EntryCallback*,
|
| + FileSystemEntryCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| - int readDirectory(DirectoryReaderBase*,
|
| + int readDirectory(FileSystemDirectoryReaderBase*,
|
| const String& path,
|
| - EntriesCallback*,
|
| + FileSystemEntriesCallback*,
|
| ErrorCallbackBase*,
|
| SynchronousType = Asynchronous);
|
| bool waitForAdditionalResult(int callbacksId);
|
| @@ -161,13 +163,13 @@ class MODULES_EXPORT DOMFileSystemBase
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| protected:
|
| - DOMFileSystemBase(ExecutionContext*,
|
| - const String& name,
|
| - FileSystemType,
|
| - const KURL& rootURL);
|
| + FileSystemBase(ExecutionContext*,
|
| + const String& name,
|
| + FileSystemType,
|
| + const KURL& rootURL);
|
|
|
| - friend class DOMFileSystemBaseTest;
|
| - friend class DOMFileSystemSync;
|
| + friend class FileSystemBaseTest;
|
| + friend class FileSystemSync;
|
|
|
| Member<ExecutionContext> m_context;
|
| String m_name;
|
| @@ -176,11 +178,11 @@ class MODULES_EXPORT DOMFileSystemBase
|
| bool m_clonable;
|
| };
|
|
|
| -inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) {
|
| +inline bool operator==(const FileSystemBase& a, const FileSystemBase& b) {
|
| return a.name() == b.name() && a.type() == b.type() &&
|
| a.rootURL() == b.rootURL();
|
| }
|
|
|
| } // namespace blink
|
|
|
| -#endif // DOMFileSystemBase_h
|
| +#endif // FileSystemBase_h
|
|
|