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_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ |
6 #define WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... | |
31 // Mount point file system location enum. | 31 // Mount point file system location enum. |
32 enum FileSystemLocation { | 32 enum FileSystemLocation { |
33 // File system that is locally mounted by the underlying OS. | 33 // File system that is locally mounted by the underlying OS. |
34 LOCAL, | 34 LOCAL, |
35 // File system that is remotely hosted on the net. | 35 // File system that is remotely hosted on the net. |
36 REMOTE, | 36 REMOTE, |
37 }; | 37 }; |
38 | 38 |
39 typedef fileapi::FileSystemMountPointProvider::ValidateFileSystemCallback | 39 typedef fileapi::FileSystemMountPointProvider::ValidateFileSystemCallback |
40 ValidateFileSystemCallback; | 40 ValidateFileSystemCallback; |
41 typedef fileapi::FileSystemMountPointProvider::DeleteFileSystemCallback | |
42 DeleteFileSystemCallback; | |
tzik
2012/07/28 00:36:46
nit: maybe, we can use "using fileapi::FileSystemM
nhiroki (google)
2012/07/28 02:01:56
Done.
| |
41 | 43 |
42 CrosMountPointProvider( | 44 CrosMountPointProvider( |
43 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); | 45 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); |
44 virtual ~CrosMountPointProvider(); | 46 virtual ~CrosMountPointProvider(); |
45 | 47 |
46 // fileapi::FileSystemMountPointProvider overrides. | 48 // fileapi::FileSystemMountPointProvider overrides. |
47 virtual void ValidateFileSystemRoot( | 49 virtual void ValidateFileSystemRoot( |
48 const GURL& origin_url, | 50 const GURL& origin_url, |
49 fileapi::FileSystemType type, | 51 fileapi::FileSystemType type, |
50 bool create, | 52 bool create, |
51 const ValidateFileSystemCallback& callback) OVERRIDE; | 53 const ValidateFileSystemCallback& callback) OVERRIDE; |
52 virtual FilePath GetFileSystemRootPathOnFileThread( | 54 virtual FilePath GetFileSystemRootPathOnFileThread( |
53 const GURL& origin_url, | 55 const GURL& origin_url, |
54 fileapi::FileSystemType type, | 56 fileapi::FileSystemType type, |
55 const FilePath& virtual_path, | 57 const FilePath& virtual_path, |
56 bool create) OVERRIDE; | 58 bool create) OVERRIDE; |
57 virtual bool IsAccessAllowed( | 59 virtual bool IsAccessAllowed( |
58 const GURL& origin_url, | 60 const GURL& origin_url, |
59 fileapi::FileSystemType type, | 61 fileapi::FileSystemType type, |
60 const FilePath& virtual_path) OVERRIDE; | 62 const FilePath& virtual_path) OVERRIDE; |
61 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; | 63 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; |
62 virtual fileapi::FileSystemFileUtil* GetFileUtil( | 64 virtual fileapi::FileSystemFileUtil* GetFileUtil( |
63 fileapi::FileSystemType type) OVERRIDE; | 65 fileapi::FileSystemType type) OVERRIDE; |
64 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) | 66 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) |
65 const OVERRIDE; | 67 const OVERRIDE; |
66 virtual fileapi::FileSystemOperationInterface* CreateFileSystemOperation( | 68 virtual fileapi::FileSystemOperationInterface* CreateFileSystemOperation( |
67 const fileapi::FileSystemURL& url, | 69 const fileapi::FileSystemURL& url, |
68 fileapi::FileSystemContext* context) const OVERRIDE; | 70 fileapi::FileSystemContext* context) const OVERRIDE; |
69 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( | 71 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( |
70 const fileapi::FileSystemURL& path, | 72 const fileapi::FileSystemURL& path, |
71 int64 offset, | 73 int64 offset, |
72 fileapi::FileSystemContext* context) const OVERRIDE; | 74 fileapi::FileSystemContext* context) const OVERRIDE; |
73 virtual fileapi::FileStreamWriter* CreateFileStreamWriter( | 75 virtual fileapi::FileStreamWriter* CreateFileStreamWriter( |
74 const fileapi::FileSystemURL& url, | 76 const fileapi::FileSystemURL& url, |
75 int64 offset, | 77 int64 offset, |
76 fileapi::FileSystemContext* context) const OVERRIDE; | 78 fileapi::FileSystemContext* context) const OVERRIDE; |
77 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 79 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
80 virtual void DeleteFileSystem( | |
81 const GURL& origin_url, | |
82 fileapi::FileSystemType type, | |
83 fileapi::FileSystemContext* context, | |
84 const DeleteFileSystemCallback& callback) const OVERRIDE; | |
78 | 85 |
79 // fileapi::ExternalFileSystemMountPointProvider overrides. | 86 // fileapi::ExternalFileSystemMountPointProvider overrides. |
80 virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE; | 87 virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE; |
81 virtual void GrantFullAccessToExtension( | 88 virtual void GrantFullAccessToExtension( |
82 const std::string& extension_id) OVERRIDE; | 89 const std::string& extension_id) OVERRIDE; |
83 virtual void GrantFileAccessToExtension( | 90 virtual void GrantFileAccessToExtension( |
84 const std::string& extension_id, const FilePath& virtual_path) OVERRIDE; | 91 const std::string& extension_id, const FilePath& virtual_path) OVERRIDE; |
85 virtual void RevokeAccessForExtension( | 92 virtual void RevokeAccessForExtension( |
86 const std::string& extension_id) OVERRIDE; | 93 const std::string& extension_id) OVERRIDE; |
87 virtual bool HasMountPoint(const FilePath& mount_point) OVERRIDE; | 94 virtual bool HasMountPoint(const FilePath& mount_point) OVERRIDE; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 MountPointMap mount_point_map_; | 136 MountPointMap mount_point_map_; |
130 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 137 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
131 scoped_ptr<FileAccessPermissions> file_access_permissions_; | 138 scoped_ptr<FileAccessPermissions> file_access_permissions_; |
132 scoped_ptr<fileapi::LocalFileUtil> local_file_util_; | 139 scoped_ptr<fileapi::LocalFileUtil> local_file_util_; |
133 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); | 140 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); |
134 }; | 141 }; |
135 | 142 |
136 } // namespace chromeos | 143 } // namespace chromeos |
137 | 144 |
138 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ | 145 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |