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_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include "base/scoped_callback_factory.h" | 8 #include "base/scoped_callback_factory.h" |
9 #include "webkit/fileapi/file_system_operation.h" | 9 #include "webkit/fileapi/file_system_operation.h" |
10 #include "webkit/fileapi/file_system_types.h" | 10 #include "webkit/fileapi/file_system_types.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class SandboxedFileSystemOperation : public FileSystemOperation { | 22 class SandboxedFileSystemOperation : public FileSystemOperation { |
23 public: | 23 public: |
24 // This class doesn't hold a reference or ownership of |file_system_context|. | 24 // This class doesn't hold a reference or ownership of |file_system_context|. |
25 // It is the caller's responsibility to keep the pointer alive *until* | 25 // It is the caller's responsibility to keep the pointer alive *until* |
26 // it calls any of the operation methods. The |file_system_context| won't be | 26 // it calls any of the operation methods. The |file_system_context| won't be |
27 // used in the callback path and can be deleted after the operation is | 27 // used in the callback path and can be deleted after the operation is |
28 // made (e.g. after one of CreateFile, CreateDirectory, Copy, etc is called). | 28 // made (e.g. after one of CreateFile, CreateDirectory, Copy, etc is called). |
29 SandboxedFileSystemOperation(FileSystemCallbackDispatcher* dispatcher, | 29 SandboxedFileSystemOperation(FileSystemCallbackDispatcher* dispatcher, |
30 scoped_refptr<base::MessageLoopProxy> proxy, | 30 scoped_refptr<base::MessageLoopProxy> proxy, |
31 SandboxedFileSystemContext* file_system_context); | 31 SandboxedFileSystemContext* file_system_context); |
| 32 virtual ~SandboxedFileSystemOperation(); |
32 | 33 |
33 void OpenFileSystem(const GURL& origin_url, | 34 void OpenFileSystem(const GURL& origin_url, |
34 fileapi::FileSystemType type, | 35 fileapi::FileSystemType type, |
35 bool create); | 36 bool create); |
36 | 37 |
37 // FileSystemOperation's methods. | 38 // FileSystemOperation's methods. |
38 virtual void CreateFile(const FilePath& path, | 39 virtual void CreateFile(const FilePath& path, |
39 bool exclusive); | 40 bool exclusive); |
40 virtual void CreateDirectory(const FilePath& path, | 41 virtual void CreateDirectory(const FilePath& path, |
41 bool exclusive, | 42 bool exclusive, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 SandboxedFileSystemContext* file_system_context_; | 98 SandboxedFileSystemContext* file_system_context_; |
98 | 99 |
99 base::ScopedCallbackFactory<SandboxedFileSystemOperation> callback_factory_; | 100 base::ScopedCallbackFactory<SandboxedFileSystemOperation> callback_factory_; |
100 | 101 |
101 DISALLOW_COPY_AND_ASSIGN(SandboxedFileSystemOperation); | 102 DISALLOW_COPY_AND_ASSIGN(SandboxedFileSystemOperation); |
102 }; | 103 }; |
103 | 104 |
104 } // namespace fileapi | 105 } // namespace fileapi |
105 | 106 |
106 #endif // WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ | 107 #endif // WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |