| 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_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| 6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Returns the next origin. Returns empty if there are no more origins. | 60 // Returns the next origin. Returns empty if there are no more origins. |
| 61 virtual GURL Next() = 0; | 61 virtual GURL Next() = 0; |
| 62 | 62 |
| 63 // Returns the current origin's information. | 63 // Returns the current origin's information. |
| 64 virtual bool HasFileSystemType(FileSystemType type) const = 0; | 64 virtual bool HasFileSystemType(FileSystemType type) const = 0; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 // The FileSystem directory name. | 67 // The FileSystem directory name. |
| 68 static const base::FilePath::CharType kFileSystemDirectory[]; | 68 static const base::FilePath::CharType kFileSystemDirectory[]; |
| 69 | 69 |
| 70 static bool CanHandleType(FileSystemType type); | 70 static bool IsSandboxType(FileSystemType type); |
| 71 | 71 |
| 72 // |file_task_runner| is used to validate the root directory and delete the | 72 // |file_task_runner| is used to validate the root directory and delete the |
| 73 // obfuscated file util. | 73 // obfuscated file util. |
| 74 SandboxMountPointProvider( | 74 SandboxMountPointProvider( |
| 75 quota::QuotaManagerProxy* quota_manager_proxy, | 75 quota::QuotaManagerProxy* quota_manager_proxy, |
| 76 base::SequencedTaskRunner* file_task_runner, | 76 base::SequencedTaskRunner* file_task_runner, |
| 77 const base::FilePath& profile_path, | 77 const base::FilePath& profile_path, |
| 78 const FileSystemOptions& file_system_options); | 78 const FileSystemOptions& file_system_options); |
| 79 virtual ~SandboxMountPointProvider(); | 79 virtual ~SandboxMountPointProvider(); |
| 80 | 80 |
| 81 // FileSystemMountPointProvider overrides. | 81 // FileSystemMountPointProvider overrides. |
| 82 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; |
| 82 virtual void ValidateFileSystemRoot( | 83 virtual void ValidateFileSystemRoot( |
| 83 const GURL& origin_url, | 84 const GURL& origin_url, |
| 84 FileSystemType type, | 85 FileSystemType type, |
| 85 bool create, | 86 bool create, |
| 86 const ValidateFileSystemCallback& callback) OVERRIDE; | 87 const ValidateFileSystemCallback& callback) OVERRIDE; |
| 87 virtual base::FilePath GetFileSystemRootPathOnFileThread( | 88 virtual base::FilePath GetFileSystemRootPathOnFileThread( |
| 88 const FileSystemURL& url, | 89 const FileSystemURL& url, |
| 89 bool create) OVERRIDE; | 90 bool create) OVERRIDE; |
| 90 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; | 91 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; |
| 91 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; | 92 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 bool enable_usage_tracking_; | 238 bool enable_usage_tracking_; |
| 238 | 239 |
| 239 base::WeakPtrFactory<SandboxMountPointProvider> weak_factory_; | 240 base::WeakPtrFactory<SandboxMountPointProvider> weak_factory_; |
| 240 | 241 |
| 241 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); | 242 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); |
| 242 }; | 243 }; |
| 243 | 244 |
| 244 } // namespace fileapi | 245 } // namespace fileapi |
| 245 | 246 |
| 246 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 247 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |