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_CONTEXT_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
15 #include "base/sequenced_task_runner_helpers.h" | 15 #include "base/sequenced_task_runner_helpers.h" |
16 #include "webkit/fileapi/file_system_types.h" | 16 #include "webkit/fileapi/file_system_types.h" |
17 #include "webkit/fileapi/task_runner_bound_observer_list.h" | 17 #include "webkit/fileapi/task_runner_bound_observer_list.h" |
18 #include "webkit/storage/webkit_storage_export.h" | 18 #include "webkit/storage/webkit_storage_export.h" |
19 | 19 |
20 class FilePath; | 20 class FilePath; |
21 | 21 |
| 22 namespace fileapi { |
| 23 class ExternalMountPoints; |
| 24 } |
| 25 |
22 namespace quota { | 26 namespace quota { |
23 class QuotaManagerProxy; | 27 class QuotaManagerProxy; |
24 class SpecialStoragePolicy; | 28 class SpecialStoragePolicy; |
25 } | 29 } |
26 | 30 |
27 namespace webkit_blob { | 31 namespace webkit_blob { |
28 class FileStreamReader; | 32 class FileStreamReader; |
29 } | 33 } |
30 | 34 |
31 namespace fileapi { | 35 namespace fileapi { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; | 198 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; |
195 scoped_ptr<IsolatedMountPointProvider> isolated_provider_; | 199 scoped_ptr<IsolatedMountPointProvider> isolated_provider_; |
196 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; | 200 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; |
197 | 201 |
198 // Registered mount point providers. | 202 // Registered mount point providers. |
199 std::map<FileSystemType, FileSystemMountPointProvider*> provider_map_; | 203 std::map<FileSystemType, FileSystemMountPointProvider*> provider_map_; |
200 | 204 |
201 // The base path of the storage partition for this context. | 205 // The base path of the storage partition for this context. |
202 const FilePath partition_path_; | 206 const FilePath partition_path_; |
203 | 207 |
| 208 // External mount points specific to the context. |
| 209 scoped_refptr<fileapi::ExternalMountPoints> external_mount_points_; |
| 210 |
204 // For syncable file systems. | 211 // For syncable file systems. |
205 scoped_ptr<LocalFileChangeTracker> change_tracker_; | 212 scoped_ptr<LocalFileChangeTracker> change_tracker_; |
206 scoped_refptr<LocalFileSyncContext> sync_context_; | 213 scoped_refptr<LocalFileSyncContext> sync_context_; |
207 | 214 |
208 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); | 215 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); |
209 }; | 216 }; |
210 | 217 |
211 struct DefaultContextDeleter { | 218 struct DefaultContextDeleter { |
212 static void Destruct(const FileSystemContext* context) { | 219 static void Destruct(const FileSystemContext* context) { |
213 context->DeleteOnCorrectThread(); | 220 context->DeleteOnCorrectThread(); |
214 } | 221 } |
215 }; | 222 }; |
216 | 223 |
217 } // namespace fileapi | 224 } // namespace fileapi |
218 | 225 |
219 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 226 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |