Chromium Code Reviews| Index: webkit/fileapi/file_system_operation.h |
| diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h |
| index faa14d5877f926ef7ab638d7728caa1b14673667..b1c855366152dc29121a5c9587ff0881f430103d 100644 |
| --- a/webkit/fileapi/file_system_operation.h |
| +++ b/webkit/fileapi/file_system_operation.h |
| @@ -17,8 +17,8 @@ |
| #include "base/platform_file.h" |
| #include "base/process.h" |
| #include "googleurl/src/gurl.h" |
| -#include "webkit/fileapi/file_system_types.h" |
| #include "webkit/fileapi/file_system_operation_context.h" |
| +#include "webkit/fileapi/file_system_types.h" |
| #include "webkit/quota/quota_manager.h" |
| namespace base { |
| @@ -38,6 +38,7 @@ class FileSystemCallbackDispatcher; |
| class FileSystemContext; |
| class FileWriterDelegate; |
| class FileSystemOperationTest; |
| +class FileSystemQuotaUtil; |
| // This class is designed to serve one-time file system operation per instance. |
| // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, |
| @@ -92,6 +93,20 @@ class FileSystemOperation { |
| void Cancel(FileSystemOperation* cancel_operation); |
| private: |
| + class ScopedQuotaUtilHelper { |
|
kinuko
2011/08/25 09:12:00
I think we can just declare 'class ScopedQuotaUtil
Dai Mikurube (NOT FULLTIME)
2011/08/25 09:19:46
We have to pass this quota_util_helper from a func
kinuko
2011/08/29 05:22:51
If keeping it as a member var is the only concern
Dai Mikurube (NOT FULLTIME)
2011/08/30 08:03:01
Thanks for the information! Done it.
|
| + public: |
| + explicit ScopedQuotaUtilHelper(FileSystemContext* context, |
| + const GURL& origin_url, |
| + FileSystemType type); |
| + ~ScopedQuotaUtilHelper(); |
| + |
| + private: |
| + FileSystemQuotaUtil* quota_util_; |
| + const GURL& origin_url_; |
| + FileSystemType type_; |
| + DISALLOW_COPY_AND_ASSIGN(ScopedQuotaUtilHelper); |
| + }; |
| + |
| FileSystemContext* file_system_context() const { |
| return file_system_operation_context_.file_system_context(); |
| } |
| @@ -239,6 +254,8 @@ class FileSystemOperation { |
| base::ScopedCallbackFactory<FileSystemOperation> callback_factory_; |
| + scoped_ptr<ScopedQuotaUtilHelper> quota_util_helper_; |
| + |
| // These are all used only by Write(). |
| friend class FileWriterDelegate; |
| scoped_ptr<FileWriterDelegate> file_writer_delegate_; |