| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 { | 52 { |
| 53 if (m_fileSystem->type() == FileSystemTypeIsolated) | 53 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 54 UseCounter::count(context, UseCounter::Entry_Filesystem_AttributeGetter_
IsolatedFileSystem); | 54 UseCounter::count(context, UseCounter::Entry_Filesystem_AttributeGetter_
IsolatedFileSystem); |
| 55 return filesystem(); | 55 return filesystem(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void Entry::getMetadata(ExecutionContext* context, MetadataCallback* successCall
back, ErrorCallback* errorCallback) | 58 void Entry::getMetadata(ExecutionContext* context, MetadataCallback* successCall
back, ErrorCallback* errorCallback) |
| 59 { | 59 { |
| 60 if (m_fileSystem->type() == FileSystemTypeIsolated) | 60 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 61 UseCounter::count(context, UseCounter::Entry_GetMetadata_Method_Isolated
FileSystem); | 61 UseCounter::count(context, UseCounter::Entry_GetMetadata_Method_Isolated
FileSystem); |
| 62 m_fileSystem->getMetadata(this, successCallback, errorCallback); | 62 m_fileSystem->getMetadata(this, successCallback, ScriptErrorCallback::wrap(e
rrorCallback)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void Entry::moveTo(ExecutionContext* context, DirectoryEntry* parent, const Stri
ng& name, EntryCallback* successCallback, ErrorCallback* errorCallback) const | 65 void Entry::moveTo(ExecutionContext* context, DirectoryEntry* parent, const Stri
ng& name, EntryCallback* successCallback, ErrorCallback* errorCallback) const |
| 66 { | 66 { |
| 67 if (m_fileSystem->type() == FileSystemTypeIsolated) | 67 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 68 UseCounter::count(context, UseCounter::Entry_MoveTo_Method_IsolatedFileS
ystem); | 68 UseCounter::count(context, UseCounter::Entry_MoveTo_Method_IsolatedFileS
ystem); |
| 69 m_fileSystem->move(this, parent, name, successCallback, errorCallback); | 69 m_fileSystem->move(this, parent, name, successCallback, ScriptErrorCallback:
:wrap(errorCallback)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void Entry::copyTo(ExecutionContext* context, DirectoryEntry* parent, const Stri
ng& name, EntryCallback* successCallback, ErrorCallback* errorCallback) const | 72 void Entry::copyTo(ExecutionContext* context, DirectoryEntry* parent, const Stri
ng& name, EntryCallback* successCallback, ErrorCallback* errorCallback) const |
| 73 { | 73 { |
| 74 if (m_fileSystem->type() == FileSystemTypeIsolated) | 74 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 75 UseCounter::count(context, UseCounter::Entry_CopyTo_Method_IsolatedFileS
ystem); | 75 UseCounter::count(context, UseCounter::Entry_CopyTo_Method_IsolatedFileS
ystem); |
| 76 m_fileSystem->copy(this, parent, name, successCallback, errorCallback); | 76 m_fileSystem->copy(this, parent, name, successCallback, ScriptErrorCallback:
:wrap(errorCallback)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void Entry::remove(ExecutionContext* context, VoidCallback* successCallback, Err
orCallback* errorCallback) const | 79 void Entry::remove(ExecutionContext* context, VoidCallback* successCallback, Err
orCallback* errorCallback) const |
| 80 { | 80 { |
| 81 if (m_fileSystem->type() == FileSystemTypeIsolated) | 81 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 82 UseCounter::count(context, UseCounter::Entry_Remove_Method_IsolatedFileS
ystem); | 82 UseCounter::count(context, UseCounter::Entry_Remove_Method_IsolatedFileS
ystem); |
| 83 m_fileSystem->remove(this, successCallback, errorCallback); | 83 m_fileSystem->remove(this, successCallback, ScriptErrorCallback::wrap(errorC
allback)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void Entry::getParent(ExecutionContext* context, EntryCallback* successCallback,
ErrorCallback* errorCallback) const | 86 void Entry::getParent(ExecutionContext* context, EntryCallback* successCallback,
ErrorCallback* errorCallback) const |
| 87 { | 87 { |
| 88 if (m_fileSystem->type() == FileSystemTypeIsolated) | 88 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 89 UseCounter::count(context, UseCounter::Entry_GetParent_Method_IsolatedFi
leSystem); | 89 UseCounter::count(context, UseCounter::Entry_GetParent_Method_IsolatedFi
leSystem); |
| 90 m_fileSystem->getParent(this, successCallback, errorCallback); | 90 m_fileSystem->getParent(this, successCallback, ScriptErrorCallback::wrap(err
orCallback)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 String Entry::toURL(ExecutionContext* context) const | 93 String Entry::toURL(ExecutionContext* context) const |
| 94 { | 94 { |
| 95 if (m_fileSystem->type() == FileSystemTypeIsolated) | 95 if (m_fileSystem->type() == FileSystemTypeIsolated) |
| 96 UseCounter::count(context, UseCounter::Entry_ToURL_Method_IsolatedFileSy
stem); | 96 UseCounter::count(context, UseCounter::Entry_ToURL_Method_IsolatedFileSy
stem); |
| 97 return static_cast<const EntryBase*>(this)->toURL(); | 97 return static_cast<const EntryBase*>(this)->toURL(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 DEFINE_TRACE(Entry) | 100 DEFINE_TRACE(Entry) |
| 101 { | 101 { |
| 102 EntryBase::trace(visitor); | 102 EntryBase::trace(visitor); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |