OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_CONTEXT_H_ |
| 6 #define WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_CONTEXT_H_ |
| 7 |
| 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_ptr.h" |
| 10 |
| 11 class FilePath; |
| 12 |
| 13 namespace base { |
| 14 class MessageLoopProxy; |
| 15 } |
| 16 |
| 17 namespace fileapi { |
| 18 |
| 19 class FileSystemPathManager; |
| 20 class FileSystemQuotaManager; |
| 21 |
| 22 // This class keeps and provides a sandboxed file system context. |
| 23 class SandboxedFileSystemContext { |
| 24 public: |
| 25 SandboxedFileSystemContext( |
| 26 scoped_refptr<base::MessageLoopProxy> file_message_loop, |
| 27 const FilePath& profile_path, |
| 28 bool is_incognito, |
| 29 bool allow_file_access_from_files, |
| 30 bool unlimited_quota); |
| 31 ~SandboxedFileSystemContext(); |
| 32 |
| 33 void Shutdown(); |
| 34 |
| 35 FileSystemPathManager* path_manager() { return path_manager_.get(); } |
| 36 FileSystemQuotaManager* quota_manager() { return quota_manager_.get(); } |
| 37 |
| 38 private: |
| 39 bool allow_file_access_from_files_; |
| 40 scoped_ptr<FileSystemPathManager> path_manager_; |
| 41 scoped_ptr<FileSystemQuotaManager> quota_manager_; |
| 42 |
| 43 DISALLOW_IMPLICIT_CONSTRUCTORS(SandboxedFileSystemContext); |
| 44 }; |
| 45 |
| 46 } // namespace fileapi |
| 47 |
| 48 #endif // WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |