| 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> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "webkit/fileapi/file_system_mount_point_provider.h" | 18 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 19 #include "webkit/fileapi/file_system_options.h" | 19 #include "webkit/fileapi/file_system_options.h" |
| 20 #include "webkit/fileapi/file_system_quota_util.h" | 20 #include "webkit/fileapi/file_system_quota_util.h" |
| 21 #include "webkit/fileapi/task_runner_bound_observer_list.h" | 21 #include "webkit/fileapi/task_runner_bound_observer_list.h" |
| 22 #include "webkit/quota/special_storage_policy.h" |
| 22 #include "webkit/storage/webkit_storage_export.h" | 23 #include "webkit/storage/webkit_storage_export.h" |
| 23 | 24 |
| 24 namespace base { | 25 namespace base { |
| 25 class SequencedTaskRunner; | 26 class SequencedTaskRunner; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace quota { | 29 namespace quota { |
| 29 class QuotaManagerProxy; | 30 class QuotaManagerProxy; |
| 31 class SpecialStoragePolicy; |
| 30 } | 32 } |
| 31 | 33 |
| 32 namespace sync_file_system { | 34 namespace sync_file_system { |
| 33 class CannedSyncableFileSystem; | 35 class CannedSyncableFileSystem; |
| 34 class SyncableFileSystemOperation; | 36 class SyncableFileSystemOperation; |
| 35 } | 37 } |
| 36 | 38 |
| 37 namespace fileapi { | 39 namespace fileapi { |
| 38 | 40 |
| 39 class AsyncFileUtilAdapter; | 41 class AsyncFileUtilAdapter; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 68 static const base::FilePath::CharType kFileSystemDirectory[]; | 70 static const base::FilePath::CharType kFileSystemDirectory[]; |
| 69 | 71 |
| 70 static bool IsSandboxType(FileSystemType type); | 72 static bool IsSandboxType(FileSystemType type); |
| 71 | 73 |
| 72 // |file_task_runner| is used to validate the root directory and delete the | 74 // |file_task_runner| is used to validate the root directory and delete the |
| 73 // obfuscated file util. | 75 // obfuscated file util. |
| 74 SandboxMountPointProvider( | 76 SandboxMountPointProvider( |
| 75 quota::QuotaManagerProxy* quota_manager_proxy, | 77 quota::QuotaManagerProxy* quota_manager_proxy, |
| 76 base::SequencedTaskRunner* file_task_runner, | 78 base::SequencedTaskRunner* file_task_runner, |
| 77 const base::FilePath& profile_path, | 79 const base::FilePath& profile_path, |
| 78 const FileSystemOptions& file_system_options); | 80 const FileSystemOptions& file_system_options, |
| 81 quota::SpecialStoragePolicy* special_storage_policy); |
| 79 virtual ~SandboxMountPointProvider(); | 82 virtual ~SandboxMountPointProvider(); |
| 80 | 83 |
| 81 // FileSystemMountPointProvider overrides. | 84 // FileSystemMountPointProvider overrides. |
| 82 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; | 85 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; |
| 83 virtual void ValidateFileSystemRoot( | 86 virtual void ValidateFileSystemRoot( |
| 84 const GURL& origin_url, | 87 const GURL& origin_url, |
| 85 FileSystemType type, | 88 FileSystemType type, |
| 86 bool create, | 89 bool create, |
| 87 const ValidateFileSystemCallback& callback) OVERRIDE; | 90 const ValidateFileSystemCallback& callback) OVERRIDE; |
| 88 virtual base::FilePath GetFileSystemRootPathOnFileThread( | 91 virtual base::FilePath GetFileSystemRootPathOnFileThread( |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 UpdateObserverList syncable_update_observers_; | 238 UpdateObserverList syncable_update_observers_; |
| 236 ChangeObserverList syncable_change_observers_; | 239 ChangeObserverList syncable_change_observers_; |
| 237 | 240 |
| 238 base::Time next_release_time_for_open_filesystem_stat_; | 241 base::Time next_release_time_for_open_filesystem_stat_; |
| 239 | 242 |
| 240 // Indicates if the usage tracking for FileSystem is enabled or not. | 243 // Indicates if the usage tracking for FileSystem is enabled or not. |
| 241 // The usage tracking is enabled by default and can be disabled by | 244 // The usage tracking is enabled by default and can be disabled by |
| 242 // a command-line switch (--disable-file-system-usage-tracking). | 245 // a command-line switch (--disable-file-system-usage-tracking). |
| 243 bool enable_usage_tracking_; | 246 bool enable_usage_tracking_; |
| 244 | 247 |
| 248 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 249 |
| 245 base::WeakPtrFactory<SandboxMountPointProvider> weak_factory_; | 250 base::WeakPtrFactory<SandboxMountPointProvider> weak_factory_; |
| 246 | 251 |
| 247 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); | 252 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); |
| 248 }; | 253 }; |
| 249 | 254 |
| 250 } // namespace fileapi | 255 } // namespace fileapi |
| 251 | 256 |
| 252 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 257 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |