| 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace base { | 23 namespace base { |
| 24 class SequencedTaskRunner; | 24 class SequencedTaskRunner; |
| 25 class SingleThreadTaskRunner; | 25 class SingleThreadTaskRunner; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace quota { | 28 namespace quota { |
| 29 class QuotaManagerProxy; | 29 class QuotaManagerProxy; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace webkit_blob { | 32 namespace webkit_blob { |
| 33 class FileReader; | 33 class FileStreamReader; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace fileapi { | 36 namespace fileapi { |
| 37 | 37 |
| 38 class ExternalFileSystemMountPointProvider; | 38 class ExternalFileSystemMountPointProvider; |
| 39 class FileSystemFileUtil; | 39 class FileSystemFileUtil; |
| 40 class FileSystemMountPointProvider; | 40 class FileSystemMountPointProvider; |
| 41 class FileSystemOperationInterface; | 41 class FileSystemOperationInterface; |
| 42 class FileSystemOptions; | 42 class FileSystemOptions; |
| 43 class FileSystemPathManager; | 43 class FileSystemPathManager; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool create, | 120 bool create, |
| 121 OpenFileSystemCallback callback); | 121 OpenFileSystemCallback callback); |
| 122 | 122 |
| 123 // Creates a new FileSystemOperation instance by cracking | 123 // Creates a new FileSystemOperation instance by cracking |
| 124 // the given filesystem URL |url| to get an appropriate MountPointProvider | 124 // the given filesystem URL |url| to get an appropriate MountPointProvider |
| 125 // and calling the provider's corresponding CreateFileSystemOperation method. | 125 // and calling the provider's corresponding CreateFileSystemOperation method. |
| 126 // The resolved MountPointProvider could perform further specialization | 126 // The resolved MountPointProvider could perform further specialization |
| 127 // depending on the filesystem type pointed by the |url|. | 127 // depending on the filesystem type pointed by the |url|. |
| 128 FileSystemOperationInterface* CreateFileSystemOperation(const GURL& url); | 128 FileSystemOperationInterface* CreateFileSystemOperation(const GURL& url); |
| 129 | 129 |
| 130 // Creates new FileReader instance to read a file pointed by the given | 130 // Creates new FileStreamReader instance to read a file pointed by the given |
| 131 // filesystem URL |url| starting from |offset|. | 131 // filesystem URL |url| starting from |offset|. |
| 132 // This method internally cracks the |url|, get an appropriate | 132 // This method internally cracks the |url|, get an appropriate |
| 133 // MountPointProvider for the URL and call the provider's CreateFileReader. | 133 // MountPointProvider for the URL and call the provider's CreateFileReader. |
| 134 // The resolved MountPointProvider could perform further specialization | 134 // The resolved MountPointProvider could perform further specialization |
| 135 // depending on the filesystem type pointed by the |url|. | 135 // depending on the filesystem type pointed by the |url|. |
| 136 webkit_blob::FileReader* CreateFileReader( | 136 webkit_blob::FileStreamReader* CreateFileStreamReader( |
| 137 const GURL& url, | 137 const GURL& url, |
| 138 int64 offset); | 138 int64 offset); |
| 139 | 139 |
| 140 // Register a filesystem provider. The ownership of |provider| is | 140 // Register a filesystem provider. The ownership of |provider| is |
| 141 // transferred to this instance. | 141 // transferred to this instance. |
| 142 void RegisterMountPointProvider(FileSystemType type, | 142 void RegisterMountPointProvider(FileSystemType type, |
| 143 FileSystemMountPointProvider* provider); | 143 FileSystemMountPointProvider* provider); |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 friend struct DefaultContextDeleter; | 146 friend struct DefaultContextDeleter; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 169 | 169 |
| 170 struct DefaultContextDeleter { | 170 struct DefaultContextDeleter { |
| 171 static void Destruct(const FileSystemContext* context) { | 171 static void Destruct(const FileSystemContext* context) { |
| 172 context->DeleteOnCorrectThread(); | 172 context->DeleteOnCorrectThread(); |
| 173 } | 173 } |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 } // namespace fileapi | 176 } // namespace fileapi |
| 177 | 177 |
| 178 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 178 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
| OLD | NEW |