| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FILE_SYSTEM_OPERATION_CONTEXT_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "webkit/fileapi/file_system_file_util.h" | 11 #include "webkit/fileapi/file_system_file_util.h" |
| 12 #include "webkit/fileapi/file_system_types.h" | 12 #include "webkit/fileapi/file_system_types.h" |
| 13 | 13 |
| 14 namespace base { |
| 15 class SequencedTaskRunner; |
| 16 } |
| 17 |
| 14 namespace fileapi { | 18 namespace fileapi { |
| 15 | 19 |
| 16 class FileSystemContext; | 20 class FileSystemContext; |
| 17 | 21 |
| 18 class FileSystemOperationContext { | 22 class FileSystemOperationContext { |
| 19 public: | 23 public: |
| 20 explicit FileSystemOperationContext(FileSystemContext* context); | 24 explicit FileSystemOperationContext(FileSystemContext* context); |
| 21 ~FileSystemOperationContext(); | 25 ~FileSystemOperationContext(); |
| 22 | 26 |
| 23 FileSystemContext* file_system_context() const { | 27 FileSystemContext* file_system_context() const { |
| 24 return file_system_context_.get(); | 28 return file_system_context_.get(); |
| 25 } | 29 } |
| 26 | 30 |
| 27 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { | 31 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { |
| 28 allowed_bytes_growth_ = allowed_bytes_growth; | 32 allowed_bytes_growth_ = allowed_bytes_growth; |
| 29 } | 33 } |
| 30 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } | 34 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } |
| 31 | 35 |
| 36 base::SequencedTaskRunner* file_task_runner() const; |
| 37 |
| 32 private: | 38 private: |
| 33 scoped_refptr<FileSystemContext> file_system_context_; | 39 scoped_refptr<FileSystemContext> file_system_context_; |
| 34 | 40 |
| 35 int64 allowed_bytes_growth_; | 41 int64 allowed_bytes_growth_; |
| 36 }; | 42 }; |
| 37 | 43 |
| 38 } // namespace fileapi | 44 } // namespace fileapi |
| 39 | 45 |
| 40 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ | 46 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ |
| OLD | NEW |