Index: WebKit/chromium/src/AsyncFileSystemChromium.cpp |
=================================================================== |
--- WebKit/chromium/src/AsyncFileSystemChromium.cpp (revision 140218) |
+++ WebKit/chromium/src/AsyncFileSystemChromium.cpp (working copy) |
@@ -48,46 +48,6 @@ |
namespace WebCore { |
-namespace { |
- |
-// Specialized callback class for createSnapshotFileAndReadMetadata. |
-class SnapshotFileCallbacks : public AsyncFileSystemCallbacks { |
-public: |
- static PassOwnPtr<SnapshotFileCallbacks> create(const KURL& internalBlobURL, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks) |
- { |
- return adoptPtr(new SnapshotFileCallbacks(internalBlobURL, callbacks)); |
- } |
- |
- virtual void didReadMetadata(const FileMetadata& metadata) |
- { |
- ASSERT(m_callbacks); |
- |
- // This will create a new File object using the metadata. |
- m_callbacks->didReadMetadata(metadata); |
- |
- // Now that we've registered the snapshot file, we can unregister our internalBlobURL which has played a placeholder for the file during the IPC. |
- ThreadableBlobRegistry::unregisterBlobURL(m_internalBlobURL); |
- } |
- |
- virtual void didFail(int error) |
- { |
- ASSERT(m_callbacks); |
- m_callbacks->didFail(error); |
- } |
- |
-private: |
- SnapshotFileCallbacks(const KURL& internalBlobURL, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks) |
- : m_internalBlobURL(internalBlobURL) |
- , m_callbacks(callbacks) |
- { |
- } |
- |
- KURL m_internalBlobURL; |
- OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; |
-}; |
- |
-} // namespace |
- |
bool AsyncFileSystem::isAvailable() |
{ |
return true; |
@@ -186,7 +146,11 @@ |
} |
delete this; |
} |
- |
+ virtual void didCreateSnapshotFile(const WebKit::WebFileInfo& info) |
+ { |
+ ASSERT_NOT_REACHED(); |
+ delete this; |
+ } |
virtual void didReadDirectory(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries, bool hasMore) |
{ |
ASSERT_NOT_REACHED(); |
@@ -219,17 +183,9 @@ |
void AsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) |
{ |
- KURL internalBlobURL = BlobURL::createInternalURL(); |
- |
- // This will create a snapshot file and register the file to a blob using the given internalBlobURL. |
- m_webFileSystem->createSnapshotFileAndReadMetadata(internalBlobURL, path, new WebKit::WebFileSystemCallbacksImpl(createSnapshotFileCallback(internalBlobURL, callbacks))); |
+ m_webFileSystem->createSnapshotFileAndReadMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); |
} |
-PassOwnPtr<AsyncFileSystemCallbacks> AsyncFileSystemChromium::createSnapshotFileCallback(const KURL& internalBlobURL, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) const |
-{ |
- return SnapshotFileCallbacks::create(internalBlobURL, callbacks); |
-} |
- |
} // namespace WebCore |
#endif |