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

Unified Diff: webkit/tools/test_shell/simple_file_system.h

Issue 4879001: Extend simple_file_system to use SandboxedFileSystemOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 10 years, 1 month 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/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_file_system.h
diff --git a/webkit/tools/test_shell/simple_file_system.h b/webkit/tools/test_shell/simple_file_system.h
index e1a82367912d790711345bb411b57b6d56e310fc..9a6758c6eb32d76c90d76371d4eea7998c4cb823 100644
--- a/webkit/tools/test_shell/simple_file_system.h
+++ b/webkit/tools/test_shell/simple_file_system.h
@@ -8,16 +8,33 @@
#include <vector>
#include "base/file_util_proxy.h"
#include "base/id_map.h"
+#include "base/scoped_temp_dir.h"
+#include "base/weak_ptr.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
-#include "webkit/fileapi/file_system_operation.h"
+#include "webkit/fileapi/file_system_types.h"
-class SimpleFileSystem : public WebKit::WebFileSystem {
+namespace WebKit {
+class WebFileSystemCallbacks;
+class WebFrame;
+}
+
+namespace fileapi {
+class SandboxedFileSystemContext;
+class SandboxedFileSystemOperation;
+}
+
+class SimpleFileSystem
+ : public WebKit::WebFileSystem,
+ public base::SupportsWeakPtr<SimpleFileSystem> {
public:
- SimpleFileSystem() {}
+ SimpleFileSystem();
virtual ~SimpleFileSystem();
- void RemoveCompletedOperation(int request_id);
+ void OpenFileSystem(WebKit::WebFrame* frame,
+ WebKit::WebFileSystem::Type type,
+ long long size,
+ bool create,
+ WebKit::WebFileSystemCallbacks* callbacks);
// WebKit::WebFileSystem methods.
virtual void move(const WebKit::WebString& src_path,
@@ -49,12 +66,13 @@ class SimpleFileSystem : public WebKit::WebFileSystem {
private:
// Helpers.
- fileapi::FileSystemOperation* GetNewOperation(
+ fileapi::SandboxedFileSystemOperation* GetNewOperation(
WebKit::WebFileSystemCallbacks* callbacks);
- // Keeps ongoing file system operations.
- typedef IDMap<fileapi::FileSystemOperation, IDMapOwnPointer> OperationsMap;
- OperationsMap operations_;
+ // A temporary directory for FileSystem API.
+ ScopedTempDir file_system_dir_;
+
+ scoped_ptr<fileapi::SandboxedFileSystemContext> sandboxed_context_;
DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem);
};
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698