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

Unified Diff: WebKit/chromium/src/AsyncFileSystemChromium.cpp

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 11 months 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
« no previous file with comments | « WebKit/chromium/src/AsyncFileSystemChromium.h ('k') | WebKit/chromium/src/AsyncFileWriterChromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « WebKit/chromium/src/AsyncFileSystemChromium.h ('k') | WebKit/chromium/src/AsyncFileWriterChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698