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/fileapi_export.h" | 11 #include "webkit/fileapi/fileapi_export.h" |
12 #include "webkit/fileapi/file_system_context.h" | 12 #include "webkit/fileapi/file_system_context.h" |
13 #include "webkit/fileapi/file_system_file_util.h" | 13 #include "webkit/fileapi/file_system_file_util.h" |
14 #include "webkit/fileapi/file_system_types.h" | 14 #include "webkit/fileapi/file_system_types.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
18 } | 18 } |
19 | 19 |
20 namespace fileapi { | 20 namespace fileapi { |
21 | 21 |
| 22 class MediaPathFilter; |
| 23 |
22 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext { | 24 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext { |
23 public: | 25 public: |
24 explicit FileSystemOperationContext(FileSystemContext* context); | 26 explicit FileSystemOperationContext(FileSystemContext* context); |
25 ~FileSystemOperationContext(); | 27 ~FileSystemOperationContext(); |
26 | 28 |
27 FileSystemContext* file_system_context() const { | 29 FileSystemContext* file_system_context() const { |
28 return file_system_context_.get(); | 30 return file_system_context_.get(); |
29 } | 31 } |
30 | 32 |
31 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { | 33 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { |
32 allowed_bytes_growth_ = allowed_bytes_growth; | 34 allowed_bytes_growth_ = allowed_bytes_growth; |
33 } | 35 } |
34 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } | 36 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } |
35 | 37 |
36 base::SequencedTaskRunner* file_task_runner() const; | 38 base::SequencedTaskRunner* file_task_runner() const; |
37 | 39 |
| 40 void set_media_path_filter(MediaPathFilter* media_path_filter) { |
| 41 media_path_filter_ = media_path_filter; |
| 42 } |
| 43 |
| 44 MediaPathFilter* media_path_filter() { |
| 45 return media_path_filter_; |
| 46 } |
| 47 |
38 private: | 48 private: |
39 scoped_refptr<FileSystemContext> file_system_context_; | 49 scoped_refptr<FileSystemContext> file_system_context_; |
40 | 50 |
41 int64 allowed_bytes_growth_; | 51 int64 allowed_bytes_growth_; |
| 52 MediaPathFilter* media_path_filter_; |
42 }; | 53 }; |
43 | 54 |
44 } // namespace fileapi | 55 } // namespace fileapi |
45 | 56 |
46 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ | 57 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ |
OLD | NEW |