| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // WebKit::WebFileSystem methods. | 22 // WebKit::WebFileSystem methods. |
| 23 virtual void move(const WebKit::WebString& src_path, | 23 virtual void move(const WebKit::WebString& src_path, |
| 24 const WebKit::WebString& dest_path, | 24 const WebKit::WebString& dest_path, |
| 25 WebKit::WebFileSystemCallbacks* callbacks); | 25 WebKit::WebFileSystemCallbacks* callbacks); |
| 26 virtual void copy(const WebKit::WebString& src_path, | 26 virtual void copy(const WebKit::WebString& src_path, |
| 27 const WebKit::WebString& dest_path, | 27 const WebKit::WebString& dest_path, |
| 28 WebKit::WebFileSystemCallbacks* callbacks); | 28 WebKit::WebFileSystemCallbacks* callbacks); |
| 29 virtual void remove(const WebKit::WebString& path, | 29 virtual void remove(const WebKit::WebString& path, |
| 30 WebKit::WebFileSystemCallbacks* callbacks); | 30 WebKit::WebFileSystemCallbacks* callbacks); |
| 31 virtual void removeRecursively(const WebKit::WebString& path, |
| 32 WebKit::WebFileSystemCallbacks* callbacks); |
| 31 virtual void readMetadata(const WebKit::WebString& path, | 33 virtual void readMetadata(const WebKit::WebString& path, |
| 32 WebKit::WebFileSystemCallbacks* callbacks); | 34 WebKit::WebFileSystemCallbacks* callbacks); |
| 33 virtual void createFile(const WebKit::WebString& path, | 35 virtual void createFile(const WebKit::WebString& path, |
| 34 bool exclusive, | 36 bool exclusive, |
| 35 WebKit::WebFileSystemCallbacks* callbacks); | 37 WebKit::WebFileSystemCallbacks* callbacks); |
| 36 virtual void createDirectory(const WebKit::WebString& path, | 38 virtual void createDirectory(const WebKit::WebString& path, |
| 37 bool exclusive, | 39 bool exclusive, |
| 38 WebKit::WebFileSystemCallbacks* callbacks); | 40 WebKit::WebFileSystemCallbacks* callbacks); |
| 39 virtual void fileExists(const WebKit::WebString& path, | 41 virtual void fileExists(const WebKit::WebString& path, |
| 40 WebKit::WebFileSystemCallbacks* callbacks); | 42 WebKit::WebFileSystemCallbacks* callbacks); |
| 41 virtual void directoryExists(const WebKit::WebString& path, | 43 virtual void directoryExists(const WebKit::WebString& path, |
| 42 WebKit::WebFileSystemCallbacks* callbacks); | 44 WebKit::WebFileSystemCallbacks* callbacks); |
| 43 virtual void readDirectory(const WebKit::WebString& path, | 45 virtual void readDirectory(const WebKit::WebString& path, |
| 44 WebKit::WebFileSystemCallbacks* callbacks); | 46 WebKit::WebFileSystemCallbacks* callbacks); |
| 45 | 47 |
| 46 private: | 48 private: |
| 47 // Helpers. | 49 // Helpers. |
| 48 fileapi::FileSystemOperation* GetNewOperation( | 50 fileapi::FileSystemOperation* GetNewOperation( |
| 49 WebKit::WebFileSystemCallbacks* callbacks); | 51 WebKit::WebFileSystemCallbacks* callbacks); |
| 50 | 52 |
| 51 // Keeps ongoing file system operations. | 53 // Keeps ongoing file system operations. |
| 52 typedef IDMap<fileapi::FileSystemOperation, IDMapOwnPointer> OperationsMap; | 54 typedef IDMap<fileapi::FileSystemOperation, IDMapOwnPointer> OperationsMap; |
| 53 OperationsMap operations_; | 55 OperationsMap operations_; |
| 54 | 56 |
| 55 DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem); | 57 DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 60 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| OLD | NEW |