| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // file system type matches with what this provider supports. | 49 // file system type matches with what this provider supports. |
| 50 // This could be called on any threads. | 50 // This could be called on any threads. |
| 51 static bool CanHandleURL(const fileapi::FileSystemURL& url); | 51 static bool CanHandleURL(const fileapi::FileSystemURL& url); |
| 52 | 52 |
| 53 // fileapi::FileSystemMountPointProvider overrides. | 53 // fileapi::FileSystemMountPointProvider overrides. |
| 54 virtual void ValidateFileSystemRoot( | 54 virtual void ValidateFileSystemRoot( |
| 55 const GURL& origin_url, | 55 const GURL& origin_url, |
| 56 fileapi::FileSystemType type, | 56 fileapi::FileSystemType type, |
| 57 bool create, | 57 bool create, |
| 58 const ValidateFileSystemCallback& callback) OVERRIDE; | 58 const ValidateFileSystemCallback& callback) OVERRIDE; |
| 59 virtual FilePath GetFileSystemRootPathOnFileThread( | 59 virtual base::FilePath GetFileSystemRootPathOnFileThread( |
| 60 const fileapi::FileSystemURL& url, | 60 const fileapi::FileSystemURL& url, |
| 61 bool create) OVERRIDE; | 61 bool create) OVERRIDE; |
| 62 virtual bool IsAccessAllowed(const fileapi::FileSystemURL& url) OVERRIDE; | 62 virtual bool IsAccessAllowed(const fileapi::FileSystemURL& url) OVERRIDE; |
| 63 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; | 63 virtual bool IsRestrictedFileName(const base::FilePath& filename) const OVERRI
DE; |
| 64 virtual fileapi::FileSystemFileUtil* GetFileUtil( | 64 virtual fileapi::FileSystemFileUtil* GetFileUtil( |
| 65 fileapi::FileSystemType type) OVERRIDE; | 65 fileapi::FileSystemType type) OVERRIDE; |
| 66 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( | 66 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( |
| 67 fileapi::FileSystemType type) OVERRIDE; | 67 fileapi::FileSystemType type) OVERRIDE; |
| 68 virtual fileapi::FilePermissionPolicy GetPermissionPolicy( | 68 virtual fileapi::FilePermissionPolicy GetPermissionPolicy( |
| 69 const fileapi::FileSystemURL& url, | 69 const fileapi::FileSystemURL& url, |
| 70 int permissions) const OVERRIDE; | 70 int permissions) const OVERRIDE; |
| 71 virtual fileapi::FileSystemOperation* CreateFileSystemOperation( | 71 virtual fileapi::FileSystemOperation* CreateFileSystemOperation( |
| 72 const fileapi::FileSystemURL& url, | 72 const fileapi::FileSystemURL& url, |
| 73 fileapi::FileSystemContext* context, | 73 fileapi::FileSystemContext* context, |
| 74 base::PlatformFileError* error_code) const OVERRIDE; | 74 base::PlatformFileError* error_code) const OVERRIDE; |
| 75 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( | 75 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( |
| 76 const fileapi::FileSystemURL& path, | 76 const fileapi::FileSystemURL& path, |
| 77 int64 offset, | 77 int64 offset, |
| 78 const base::Time& expected_modification_time, | 78 const base::Time& expected_modification_time, |
| 79 fileapi::FileSystemContext* context) const OVERRIDE; | 79 fileapi::FileSystemContext* context) const OVERRIDE; |
| 80 virtual fileapi::FileStreamWriter* CreateFileStreamWriter( | 80 virtual fileapi::FileStreamWriter* CreateFileStreamWriter( |
| 81 const fileapi::FileSystemURL& url, | 81 const fileapi::FileSystemURL& url, |
| 82 int64 offset, | 82 int64 offset, |
| 83 fileapi::FileSystemContext* context) const OVERRIDE; | 83 fileapi::FileSystemContext* context) const OVERRIDE; |
| 84 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 84 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
| 85 virtual void DeleteFileSystem( | 85 virtual void DeleteFileSystem( |
| 86 const GURL& origin_url, | 86 const GURL& origin_url, |
| 87 fileapi::FileSystemType type, | 87 fileapi::FileSystemType type, |
| 88 fileapi::FileSystemContext* context, | 88 fileapi::FileSystemContext* context, |
| 89 const DeleteFileSystemCallback& callback) OVERRIDE; | 89 const DeleteFileSystemCallback& callback) OVERRIDE; |
| 90 | 90 |
| 91 // fileapi::ExternalFileSystemMountPointProvider overrides. | 91 // fileapi::ExternalFileSystemMountPointProvider overrides. |
| 92 virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE; | 92 virtual std::vector<base::FilePath> GetRootDirectories() const OVERRIDE; |
| 93 virtual void GrantFullAccessToExtension( | 93 virtual void GrantFullAccessToExtension( |
| 94 const std::string& extension_id) OVERRIDE; | 94 const std::string& extension_id) OVERRIDE; |
| 95 virtual void GrantFileAccessToExtension( | 95 virtual void GrantFileAccessToExtension( |
| 96 const std::string& extension_id, const FilePath& virtual_path) OVERRIDE; | 96 const std::string& extension_id, const base::FilePath& virtual_path) OVERR
IDE; |
| 97 virtual void RevokeAccessForExtension( | 97 virtual void RevokeAccessForExtension( |
| 98 const std::string& extension_id) OVERRIDE; | 98 const std::string& extension_id) OVERRIDE; |
| 99 virtual bool GetVirtualPath(const FilePath& filesystem_path, | 99 virtual bool GetVirtualPath(const base::FilePath& filesystem_path, |
| 100 FilePath* virtual_path) OVERRIDE; | 100 base::FilePath* virtual_path) OVERRIDE; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy( | 103 fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy( |
| 104 const std::string& mount_name) const; | 104 const std::string& mount_name) const; |
| 105 | 105 |
| 106 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 106 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 107 scoped_ptr<FileAccessPermissions> file_access_permissions_; | 107 scoped_ptr<FileAccessPermissions> file_access_permissions_; |
| 108 scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_; | 108 scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_; |
| 109 | 109 |
| 110 // Mount points specific to the owning context. | 110 // Mount points specific to the owning context. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 124 // Globally visible mount points. System MountPonts instance should outlive | 124 // Globally visible mount points. System MountPonts instance should outlive |
| 125 // all CrosMountPointProvider instances, so raw pointer is safe. | 125 // all CrosMountPointProvider instances, so raw pointer is safe. |
| 126 fileapi::ExternalMountPoints* system_mount_points_; | 126 fileapi::ExternalMountPoints* system_mount_points_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); | 128 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace chromeos | 131 } // namespace chromeos |
| 132 | 132 |
| 133 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ | 133 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |