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

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

Issue 23704004: Make WebFileSystemCallbacks not self-destruct, deprecate AsyncFileSystem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/DOMFileSystemBase.h
diff --git a/Source/modules/filesystem/DOMFileSystemBase.h b/Source/modules/filesystem/DOMFileSystemBase.h
index 640a3bfd42950ad47ec48bf2ea90b1de2662550e..d3c3c687761f1348b7921738ba523ba908154846 100644
--- a/Source/modules/filesystem/DOMFileSystemBase.h
+++ b/Source/modules/filesystem/DOMFileSystemBase.h
@@ -31,7 +31,6 @@
#ifndef DOMFileSystemBase_h
#define DOMFileSystemBase_h
-#include "core/platform/AsyncFileSystem.h"
#include "modules/filesystem/FileSystemFlags.h"
#include "modules/filesystem/FileSystemType.h"
#include "weborigin/KURL.h"
@@ -39,6 +38,10 @@
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
+namespace WebKit {
+class WebFileSystem;
+}
+
namespace WebCore {
class DirectoryEntry;
@@ -67,16 +70,16 @@ public:
static const char isolatedPathPrefix[];
static const char externalPathPrefix[];
- static PassRefPtr<DOMFileSystemBase> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ static PassRefPtr<DOMFileSystemBase> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL)
{
- return adoptRef(new DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem));
+ return adoptRef(new DOMFileSystemBase(context, name, type, rootURL));
}
virtual ~DOMFileSystemBase();
const String& name() const { return m_name; }
FileSystemType type() const { return m_type; }
KURL rootURL() const { return m_filesystemRootURL; }
- AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
+ WebKit::WebFileSystem* fileSystem() const;
SecurityOrigin* securityOrigin() const;
// The clonable flag is used in the structured clone algorithm to test
@@ -92,7 +95,7 @@ public:
KURL createFileSystemURL(const String& fullPath) const;
// Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
- // They return false for immediate errors that don't involve lower AsyncFileSystem layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
+ // They return false for immediate errors that don't involve lower WebFileSystem layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
bool getMetadata(const EntryBase*, PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchronous);
bool move(const EntryBase* source, EntryBase* parent, const String& name, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchronous);
bool copy(const EntryBase* source, EntryBase* parent, const String& name, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchronous);
@@ -104,7 +107,7 @@ public:
bool readDirectory(PassRefPtr<DirectoryReaderBase>, const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchronous);
protected:
- DOMFileSystemBase(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
+ DOMFileSystemBase(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL);
friend class DOMFileSystemSync;
ScriptExecutionContext* m_context;
@@ -112,8 +115,6 @@ protected:
FileSystemType m_type;
KURL m_filesystemRootURL;
bool m_clonable;
-
- mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
};
inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL(); }

Powered by Google App Engine
This is Rietveld 408576698