| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "storage/browser/fileapi/file_system_backend.h" | 15 #include "storage/browser/fileapi/file_system_backend.h" |
| 16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h" | 16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h" |
| 17 #include "storage/browser/quota/special_storage_policy.h" | |
| 18 #include "storage/common/fileapi/file_system_types.h" | 17 #include "storage/common/fileapi/file_system_types.h" |
| 19 | 18 |
| 20 namespace storage { | 19 namespace storage { |
| 21 class CopyOrMoveFileValidatorFactory; | 20 class CopyOrMoveFileValidatorFactory; |
| 22 class ExternalMountPoints; | 21 class ExternalMountPoints; |
| 23 class FileSystemURL; | 22 class FileSystemURL; |
| 24 class WatcherManager; | 23 class WatcherManager; |
| 25 } // namespace storage | 24 } // namespace storage |
| 26 | 25 |
| 27 namespace chromeos { | 26 namespace chromeos { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 66 |
| 68 // FileSystemBackend will take an ownership of a |mount_points| | 67 // FileSystemBackend will take an ownership of a |mount_points| |
| 69 // reference. On the other hand, |system_mount_points| will be kept as a raw | 68 // reference. On the other hand, |system_mount_points| will be kept as a raw |
| 70 // pointer and it should outlive FileSystemBackend instance. | 69 // pointer and it should outlive FileSystemBackend instance. |
| 71 // The ownerships of |drive_delegate| and |file_system_provider_delegate| are | 70 // The ownerships of |drive_delegate| and |file_system_provider_delegate| are |
| 72 // also taken. | 71 // also taken. |
| 73 FileSystemBackend( | 72 FileSystemBackend( |
| 74 FileSystemBackendDelegate* drive_delegate, | 73 FileSystemBackendDelegate* drive_delegate, |
| 75 FileSystemBackendDelegate* file_system_provider_delegate, | 74 FileSystemBackendDelegate* file_system_provider_delegate, |
| 76 FileSystemBackendDelegate* mtp_delegate, | 75 FileSystemBackendDelegate* mtp_delegate, |
| 77 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy, | |
| 78 scoped_refptr<storage::ExternalMountPoints> mount_points, | 76 scoped_refptr<storage::ExternalMountPoints> mount_points, |
| 79 storage::ExternalMountPoints* system_mount_points); | 77 storage::ExternalMountPoints* system_mount_points); |
| 80 ~FileSystemBackend() override; | 78 ~FileSystemBackend() override; |
| 81 | 79 |
| 82 // Adds system mount points, such as "archive", and "removable". This | 80 // Adds system mount points, such as "archive", and "removable". This |
| 83 // function is no-op if these mount points are already present. | 81 // function is no-op if these mount points are already present. |
| 84 void AddSystemMountPoints(); | 82 void AddSystemMountPoints(); |
| 85 | 83 |
| 86 // Returns true if CrosMountpointProvider can handle |url|, i.e. its | 84 // Returns true if CrosMountpointProvider can handle |url|, i.e. its |
| 87 // file system type matches with what this provider supports. | 85 // file system type matches with what this provider supports. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool GetVirtualPath(const base::FilePath& filesystem_path, | 133 bool GetVirtualPath(const base::FilePath& filesystem_path, |
| 136 base::FilePath* virtual_path) const override; | 134 base::FilePath* virtual_path) const override; |
| 137 void GetRedirectURLForContents( | 135 void GetRedirectURLForContents( |
| 138 const storage::FileSystemURL& url, | 136 const storage::FileSystemURL& url, |
| 139 const storage::URLCallback& callback) const override; | 137 const storage::URLCallback& callback) const override; |
| 140 storage::FileSystemURL CreateInternalURL( | 138 storage::FileSystemURL CreateInternalURL( |
| 141 storage::FileSystemContext* context, | 139 storage::FileSystemContext* context, |
| 142 const base::FilePath& entry_path) const override; | 140 const base::FilePath& entry_path) const override; |
| 143 | 141 |
| 144 private: | 142 private: |
| 145 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | |
| 146 scoped_ptr<FileAccessPermissions> file_access_permissions_; | 143 scoped_ptr<FileAccessPermissions> file_access_permissions_; |
| 147 scoped_ptr<storage::AsyncFileUtil> local_file_util_; | 144 scoped_ptr<storage::AsyncFileUtil> local_file_util_; |
| 148 | 145 |
| 149 // The delegate instance for the drive file system related operations. | 146 // The delegate instance for the drive file system related operations. |
| 150 scoped_ptr<FileSystemBackendDelegate> drive_delegate_; | 147 scoped_ptr<FileSystemBackendDelegate> drive_delegate_; |
| 151 | 148 |
| 152 // The delegate instance for the provided file system related operations. | 149 // The delegate instance for the provided file system related operations. |
| 153 scoped_ptr<FileSystemBackendDelegate> file_system_provider_delegate_; | 150 scoped_ptr<FileSystemBackendDelegate> file_system_provider_delegate_; |
| 154 | 151 |
| 155 // The delegate instance for the MTP file system related operations. | 152 // The delegate instance for the MTP file system related operations. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 171 // Globally visible mount points. System MountPonts instance should outlive | 168 // Globally visible mount points. System MountPonts instance should outlive |
| 172 // all FileSystemBackend instances, so raw pointer is safe. | 169 // all FileSystemBackend instances, so raw pointer is safe. |
| 173 storage::ExternalMountPoints* system_mount_points_; | 170 storage::ExternalMountPoints* system_mount_points_; |
| 174 | 171 |
| 175 DISALLOW_COPY_AND_ASSIGN(FileSystemBackend); | 172 DISALLOW_COPY_AND_ASSIGN(FileSystemBackend); |
| 176 }; | 173 }; |
| 177 | 174 |
| 178 } // namespace chromeos | 175 } // namespace chromeos |
| 179 | 176 |
| 180 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |