| Index: third_party/WebKit/Source/modules/filesystem/FileSystemEntry.cpp
|
| diff --git a/third_party/WebKit/Source/modules/filesystem/Entry.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemEntry.cpp
|
| similarity index 59%
|
| rename from third_party/WebKit/Source/modules/filesystem/Entry.cpp
|
| rename to third_party/WebKit/Source/modules/filesystem/FileSystemEntry.cpp
|
| index 68dc6bf4217a34b887b7ac8cae52d414316db07e..d32f8d5c469fed4bfa56b46e6621cbd3f10c147f 100644
|
| --- a/third_party/WebKit/Source/modules/filesystem/Entry.cpp
|
| +++ b/third_party/WebKit/Source/modules/filesystem/FileSystemEntry.cpp
|
| @@ -27,96 +27,104 @@
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
| -#include "modules/filesystem/Entry.h"
|
| +#include "modules/filesystem/FileSystemEntry.h"
|
|
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/fileapi/FileError.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/html/VoidCallback.h"
|
| -#include "modules/filesystem/DirectoryEntry.h"
|
| -#include "modules/filesystem/EntryCallback.h"
|
| #include "modules/filesystem/ErrorCallback.h"
|
| #include "modules/filesystem/FileSystemCallbacks.h"
|
| -#include "modules/filesystem/MetadataCallback.h"
|
| +#include "modules/filesystem/FileSystemDirectoryEntry.h"
|
| +#include "modules/filesystem/FileSystemEntryCallback.h"
|
| +#include "modules/filesystem/FileSystemMetadataCallback.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| namespace blink {
|
|
|
| -Entry::Entry(DOMFileSystemBase* fileSystem, const String& fullPath)
|
| - : EntryBase(fileSystem, fullPath) {}
|
| +FileSystemEntry::FileSystemEntry(FileSystemBase* fileSystem,
|
| + const String& fullPath)
|
| + : FileSystemEntryBase(fileSystem, fullPath) {}
|
|
|
| -DOMFileSystem* Entry::filesystem(ExecutionContext* context) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +FileSystem* FileSystemEntry::filesystem(ExecutionContext* context) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(
|
| context,
|
| UseCounter::Entry_Filesystem_AttributeGetter_IsolatedFileSystem);
|
| + }
|
| return filesystem();
|
| }
|
|
|
| -void Entry::getMetadata(ExecutionContext* context,
|
| - MetadataCallback* successCallback,
|
| - ErrorCallback* errorCallback) {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +void FileSystemEntry::getMetadata(ExecutionContext* context,
|
| + FileSystemMetadataCallback* successCallback,
|
| + ErrorCallback* errorCallback) {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_GetMetadata_Method_IsolatedFileSystem);
|
| + }
|
| m_fileSystem->getMetadata(this, successCallback,
|
| ScriptErrorCallback::wrap(errorCallback));
|
| }
|
|
|
| -void Entry::moveTo(ExecutionContext* context,
|
| - DirectoryEntry* parent,
|
| - const String& name,
|
| - EntryCallback* successCallback,
|
| - ErrorCallback* errorCallback) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +void FileSystemEntry::moveTo(ExecutionContext* context,
|
| + FileSystemDirectoryEntry* parent,
|
| + const String& name,
|
| + FileSystemEntryCallback* successCallback,
|
| + ErrorCallback* errorCallback) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_MoveTo_Method_IsolatedFileSystem);
|
| + }
|
| m_fileSystem->move(this, parent, name, successCallback,
|
| ScriptErrorCallback::wrap(errorCallback));
|
| }
|
|
|
| -void Entry::copyTo(ExecutionContext* context,
|
| - DirectoryEntry* parent,
|
| - const String& name,
|
| - EntryCallback* successCallback,
|
| - ErrorCallback* errorCallback) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +void FileSystemEntry::copyTo(ExecutionContext* context,
|
| + FileSystemDirectoryEntry* parent,
|
| + const String& name,
|
| + FileSystemEntryCallback* successCallback,
|
| + ErrorCallback* errorCallback) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_CopyTo_Method_IsolatedFileSystem);
|
| + }
|
| m_fileSystem->copy(this, parent, name, successCallback,
|
| ScriptErrorCallback::wrap(errorCallback));
|
| }
|
|
|
| -void Entry::remove(ExecutionContext* context,
|
| - VoidCallback* successCallback,
|
| - ErrorCallback* errorCallback) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +void FileSystemEntry::remove(ExecutionContext* context,
|
| + VoidCallback* successCallback,
|
| + ErrorCallback* errorCallback) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_Remove_Method_IsolatedFileSystem);
|
| + }
|
| m_fileSystem->remove(this, successCallback,
|
| ScriptErrorCallback::wrap(errorCallback));
|
| }
|
|
|
| -void Entry::getParent(ExecutionContext* context,
|
| - EntryCallback* successCallback,
|
| - ErrorCallback* errorCallback) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +void FileSystemEntry::getParent(ExecutionContext* context,
|
| + FileSystemEntryCallback* successCallback,
|
| + ErrorCallback* errorCallback) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_GetParent_Method_IsolatedFileSystem);
|
| + }
|
| m_fileSystem->getParent(this, successCallback,
|
| ScriptErrorCallback::wrap(errorCallback));
|
| }
|
|
|
| -String Entry::toURL(ExecutionContext* context) const {
|
| - if (m_fileSystem->type() == FileSystemTypeIsolated)
|
| +String FileSystemEntry::toURL(ExecutionContext* context) const {
|
| + if (m_fileSystem->type() == FileSystemTypeIsolated) {
|
| UseCounter::count(context,
|
| UseCounter::Entry_ToURL_Method_IsolatedFileSystem);
|
| - return static_cast<const EntryBase*>(this)->toURL();
|
| + }
|
| + return static_cast<const FileSystemEntryBase*>(this)->toURL();
|
| }
|
|
|
| -DEFINE_TRACE(Entry) {
|
| - EntryBase::trace(visitor);
|
| +DEFINE_TRACE(FileSystemEntry) {
|
| + FileSystemEntryBase::trace(visitor);
|
| }
|
|
|
| } // namespace blink
|
|
|