Changeset 71206 in webkit
- Timestamp:
- Nov 2, 2010 7:59:03 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r71205 r71206 1 2010-11-02 Kavita Kanetkar <kkanetkar@chromium.org> 2 3 Reviewed by Dumitru Daniliuc. 4 5 [FileSystem] Support not creating directories when queried by inspector. 6 https://bugs.webkit.org/show_bug.cgi?id=48169 7 8 * fileapi/LocalFileSystem.cpp: 9 (WebCore::openFileSystem): 10 (WebCore::LocalFileSystem::readFileSystem): 11 (WebCore::LocalFileSystem::requestFileSystem): 12 * fileapi/LocalFileSystem.h: 13 * platform/AsyncFileSystem.cpp: 14 (WebCore::AsyncFileSystem::openFileSystem): 15 * platform/AsyncFileSystem.h: 16 1 17 2010-11-02 Chris Rogers <crogers@google.com> 2 18 -
trunk/WebCore/fileapi/LocalFileSystem.cpp
r69249 r71206 77 77 } 78 78 79 static void openFileSystem(ScriptExecutionContext*, const String& basePath, const String& identifier, AsyncFileSystem::Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)79 static void openFileSystem(ScriptExecutionContext*, const String& basePath, const String& identifier, AsyncFileSystem::Type type, bool create, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 80 80 { 81 AsyncFileSystem::openFileSystem(basePath, identifier, type, callbacks); 81 AsyncFileSystem::openFileSystem(basePath, identifier, type, create, callbacks); 82 } 83 84 void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 85 { 86 // AsyncFileSystem::openFileSystem calls callbacks synchronously, so the method needs to be called asynchronously. 87 context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, false, callbacks)); 82 88 } 83 89 … … 85 91 { 86 92 // AsyncFileSystem::openFileSystem calls callbacks synchronously, so the method needs to be called asynchronously. 87 context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, callbacks));93 context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, true, callbacks)); 88 94 } 89 95 -
trunk/WebCore/fileapi/LocalFileSystem.h
r69249 r71206 53 53 static LocalFileSystem& localFileSystem(); 54 54 55 // Does not create the root path for file system, just reads it if available. 56 void readFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassOwnPtr<AsyncFileSystemCallbacks>); 57 55 58 void requestFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassOwnPtr<AsyncFileSystemCallbacks>, bool synchronous = false); 56 59 -
trunk/WebCore/platform/AsyncFileSystem.cpp
r68222 r71206 54 54 55 55 // Default implementation. 56 void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)56 void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, bool, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 57 57 { 58 58 String typeString = (type == Persistent) ? "Persistent" : "Temporary"; -
trunk/WebCore/platform/AsyncFileSystem.h
r70956 r71206 67 67 static PassOwnPtr<AsyncFileSystem> create(const String& rootPath); 68 68 69 // Opens a new file system. 70 static void openFileSystem(const String& basePath, const String& storageIdentifier, Type, PassOwnPtr<AsyncFileSystemCallbacks>);69 // Opens a new file system. The create parameter specifies whether or not to create the path if it does not already exists. 70 static void openFileSystem(const String& basePath, const String& storageIdentifier, Type, bool create, PassOwnPtr<AsyncFileSystemCallbacks>); 71 71 72 72 // Moves a file or directory from srcPath to destPath. -
trunk/WebKit/chromium/ChangeLog
r71198 r71206 1 2010-11-02 Kavita Kanetkar <kkanetkar@chromium.org> 2 3 Reviewed by Dumitru Daniliuc. 4 5 [FileSystem] Support not creating directories when queried by inspector. 6 https://bugs.webkit.org/show_bug.cgi?id=48169 7 8 * src/LocalFileSystemChromium.cpp: 9 (WebCore::LocalFileSystem::readFileSystem): 10 (WebCore::LocalFileSystem::requestFileSystem): 11 1 12 2010-11-02 Chris Guillory <chris.guillory@google.com> 2 13 -
trunk/WebKit/chromium/src/LocalFileSystemChromium.cpp
r69249 r71206 58 58 } 59 59 60 void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 61 { 62 ASSERT(context && context->isDocument()); 63 Document* document = static_cast<Document*>(context); 64 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); 65 webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks)); 66 } 67 60 68 void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous) 61 69 { … … 64 72 Document* document = static_cast<Document*>(context); 65 73 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); 66 webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks));74 webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks)); 67 75 } else { 68 76 WorkerContext* workerContext = static_cast<WorkerContext*>(context);
Note: See TracChangeset
for help on using the changeset viewer.