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

Unified Diff: Source/modules/filesystem/LocalFileSystem.h

Issue 277353002: Use asynchronized api for file system request. [blink] (3/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Wrap AsyncFileSystemCallbacks. Created 6 years, 7 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
Index: Source/modules/filesystem/LocalFileSystem.h
diff --git a/Source/modules/filesystem/LocalFileSystem.h b/Source/modules/filesystem/LocalFileSystem.h
index 867db6c7bf5a65512524817f1a574dd5bce183d1..52337f0537dede085e85f3a3fe1a8d097a6d3584 100644
--- a/Source/modules/filesystem/LocalFileSystem.h
+++ b/Source/modules/filesystem/LocalFileSystem.h
@@ -35,6 +35,7 @@
#include "core/workers/WorkerClients.h"
#include "platform/FileSystemType.h"
#include "wtf/Forward.h"
+#include "wtf/Functional.h"
namespace WebCore {
@@ -42,6 +43,12 @@ class AsyncFileSystemCallbacks;
class FileSystemClient;
class ExecutionContext;
+struct RefCountedFileSystemCallbacks : RefCounted<RefCountedFileSystemCallbacks> {
kinuko 2014/05/22 10:37:42 This can be hidden in .cpp file.
Xi Han 2014/05/22 14:21:41 Done.
+ RefCountedFileSystemCallbacks(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+ : callbacks(callbacks) { }
+ PassOwnPtr<AsyncFileSystemCallbacks> callbacks;
kinuko 2014/05/22 10:37:42 Usually we don't use PassOwnPtr for storage type
Xi Han 2014/05/22 14:21:41 Oh, I see, great catch, thanks.
+};
+
class LocalFileSystem FINAL : public NoBaseWillBeGarbageCollectedFinalized<LocalFileSystem>, public WillBeHeapSupplement<Page>, public WillBeHeapSupplement<WorkerClients> {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem);
WTF_MAKE_NONCOPYABLE(LocalFileSystem);
@@ -63,10 +70,14 @@ public:
WillBeHeapSupplement<Page>::trace(visitor);
WillBeHeapSupplement<WorkerClients>::trace(visitor);
}
-
protected:
explicit LocalFileSystem(PassOwnPtr<FileSystemClient>);
-
+private:
+ void fileSystemNotAllowedInternal(PassRefPtr<ExecutionContext>, PassRefPtr<RefCountedFileSystemCallbacks>);
+ void fileSystemAllowedInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<RefCountedFileSystemCallbacks>);
+ void resolveURLInternal(const KURL&, PassRefPtr<RefCountedFileSystemCallbacks>);
+ void deleteFileSystemInternal(PassRefPtr<ExecutionContext>, FileSystemType, PassRefPtr<RefCountedFileSystemCallbacks>);
+ void requestFileSystemAccesssAsyncInternal(PassRefPtr<ExecutionContext>, const Closure&, const Closure&);
OwnPtr<FileSystemClient> m_client;
};

Powered by Google App Engine
This is Rietveld 408576698