| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace chromeos { | 23 namespace chromeos { |
| 24 | 24 |
| 25 class FileAccessPermissions; | 25 class FileAccessPermissions; |
| 26 | 26 |
| 27 // An interface to provide local filesystem paths. | 27 // An interface to provide local filesystem paths. |
| 28 class CrosMountPointProvider | 28 class CrosMountPointProvider |
| 29 : public fileapi::ExternalFileSystemMountPointProvider { | 29 : public fileapi::ExternalFileSystemMountPointProvider { |
| 30 public: | 30 public: |
| 31 typedef fileapi::FileSystemMountPointProvider::GetRootPathCallback |
| 32 GetRootPathCallback; |
| 33 |
| 31 CrosMountPointProvider( | 34 CrosMountPointProvider( |
| 32 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); | 35 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); |
| 33 virtual ~CrosMountPointProvider(); | 36 virtual ~CrosMountPointProvider(); |
| 34 | 37 |
| 35 // fileapi::FileSystemMountPointProvider overrides. | 38 // fileapi::FileSystemMountPointProvider overrides. |
| 36 virtual bool IsAccessAllowed(const GURL& origin_url, | 39 virtual bool IsAccessAllowed(const GURL& origin_url, |
| 37 fileapi::FileSystemType type, | 40 fileapi::FileSystemType type, |
| 38 const FilePath& virtual_path) OVERRIDE; | 41 const FilePath& virtual_path) OVERRIDE; |
| 39 virtual void ValidateFileSystemRootAndGetURL( | 42 virtual void ValidateFileSystemRootAndGetURL( |
| 40 const GURL& origin_url, | 43 const GURL& origin_url, |
| 41 fileapi::FileSystemType type, | 44 fileapi::FileSystemType type, |
| 42 bool create, | 45 bool create, |
| 43 const fileapi::FileSystemPathManager::GetRootPathCallback& callback) | 46 const GetRootPathCallback& callback) |
| 44 OVERRIDE; | 47 OVERRIDE; |
| 45 virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread( | 48 virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread( |
| 46 const GURL& origin_url, | 49 const GURL& origin_url, |
| 47 fileapi::FileSystemType type, | 50 fileapi::FileSystemType type, |
| 48 const FilePath& virtual_path, | 51 const FilePath& virtual_path, |
| 49 bool create) OVERRIDE; | 52 bool create) OVERRIDE; |
| 50 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; | 53 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; |
| 51 virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE; | 54 virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE; |
| 52 virtual fileapi::FileSystemFileUtil* GetFileUtil() OVERRIDE; | 55 virtual fileapi::FileSystemFileUtil* GetFileUtil() OVERRIDE; |
| 53 | 56 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 75 MountPointMap mount_point_map_; | 78 MountPointMap mount_point_map_; |
| 76 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 79 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 77 scoped_ptr<FileAccessPermissions> file_access_permissions_; | 80 scoped_ptr<FileAccessPermissions> file_access_permissions_; |
| 78 scoped_ptr<fileapi::LocalFileUtil> local_file_util_; | 81 scoped_ptr<fileapi::LocalFileUtil> local_file_util_; |
| 79 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); | 82 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace chromeos | 85 } // namespace chromeos |
| 83 | 86 |
| 84 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ | 87 #endif // WEBKIT_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |