diff options
Diffstat (limited to 'webkit/fileapi/sandboxed_file_system_context.h')
-rw-r--r-- | webkit/fileapi/sandboxed_file_system_context.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/webkit/fileapi/sandboxed_file_system_context.h b/webkit/fileapi/sandboxed_file_system_context.h index 6c72bc0..fcb90bb 100644 --- a/webkit/fileapi/sandboxed_file_system_context.h +++ b/webkit/fileapi/sandboxed_file_system_context.h @@ -24,10 +24,13 @@ class SandboxedFileSystemContext; struct DefaultContextDeleter; // This class keeps and provides a sandboxed file system context. -class SandboxedFileSystemContext { +class SandboxedFileSystemContext + : public base::RefCountedThreadSafe<SandboxedFileSystemContext, + DefaultContextDeleter> { public: SandboxedFileSystemContext( scoped_refptr<base::MessageLoopProxy> file_message_loop, + scoped_refptr<base::MessageLoopProxy> io_message_loop, const FilePath& profile_path, bool is_incognito, bool allow_file_access_from_files, @@ -38,6 +41,10 @@ class SandboxedFileSystemContext { void DeleteDataForOriginOnFileThread(const GURL& origin_url); + // Quota related methods. + void SetOriginQuotaUnlimited(const GURL& url); + void ResetOriginQuotaUnlimited(const GURL& url); + FileSystemPathManager* path_manager() { return path_manager_.get(); } FileSystemQuotaManager* quota_manager() { return quota_manager_.get(); } @@ -47,12 +54,19 @@ class SandboxedFileSystemContext { bool allow_file_access_from_files_; scoped_refptr<base::MessageLoopProxy> file_message_loop_; + scoped_refptr<base::MessageLoopProxy> io_message_loop_; scoped_ptr<FileSystemPathManager> path_manager_; scoped_ptr<FileSystemQuotaManager> quota_manager_; DISALLOW_IMPLICIT_CONSTRUCTORS(SandboxedFileSystemContext); }; +struct DefaultContextDeleter { + static void Destruct(const SandboxedFileSystemContext* context) { + context->DeleteOnCorrectThread(); + } +}; + } // namespace fileapi #endif // WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_CONTEXT_H_ |