| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 base::File::Error MountFileSystem(const std::string& extension_id, | 86 base::File::Error MountFileSystem(const std::string& extension_id, |
| 87 const MountOptions& options); | 87 const MountOptions& options); |
| 88 | 88 |
| 89 // Unmounts a file system with the specified |file_system_id| for the | 89 // Unmounts a file system with the specified |file_system_id| for the |
| 90 // |extension_id|. For success returns base::File::FILE_OK, otherwise an error | 90 // |extension_id|. For success returns base::File::FILE_OK, otherwise an error |
| 91 // code. | 91 // code. |
| 92 base::File::Error UnmountFileSystem(const std::string& extension_id, | 92 base::File::Error UnmountFileSystem(const std::string& extension_id, |
| 93 const std::string& file_system_id, | 93 const std::string& file_system_id, |
| 94 UnmountReason reason); | 94 UnmountReason reason); |
| 95 | 95 |
| 96 // Requests unmounting of the file system. The callback is called when the | 96 // Requests unmounting of the file system. Returns false if the request could |
| 97 // request is accepted or rejected, with an error code. Returns false if the | 97 // not been created, true otherwise. |
| 98 // request could not been created, true otherwise. | |
| 99 bool RequestUnmount(const std::string& extension_id, | 98 bool RequestUnmount(const std::string& extension_id, |
| 100 const std::string& file_system_id); | 99 const std::string& file_system_id); |
| 101 | 100 |
| 101 // Requests mounting a new file system by the providing extension with |
| 102 // |extension_id|. Returns false if the request could not been created, true |
| 103 // otherwise. |
| 104 bool RequestMount(const std::string& extension_id); |
| 105 |
| 102 // Returns a list of information of all currently provided file systems. All | 106 // Returns a list of information of all currently provided file systems. All |
| 103 // items are copied. | 107 // items are copied. |
| 104 std::vector<ProvidedFileSystemInfo> GetProvidedFileSystemInfoList(); | 108 std::vector<ProvidedFileSystemInfo> GetProvidedFileSystemInfoList(); |
| 105 | 109 |
| 106 // Returns a provided file system with |file_system_id|, handled by | 110 // Returns a provided file system with |file_system_id|, handled by |
| 107 // the extension with |extension_id|. If not found, then returns NULL. | 111 // the extension with |extension_id|. If not found, then returns NULL. |
| 108 ProvidedFileSystemInterface* GetProvidedFileSystem( | 112 ProvidedFileSystemInterface* GetProvidedFileSystem( |
| 109 const std::string& extension_id, | 113 const std::string& extension_id, |
| 110 const std::string& file_system_id); | 114 const std::string& file_system_id); |
| 111 | 115 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 base::ThreadChecker thread_checker_; | 190 base::ThreadChecker thread_checker_; |
| 187 | 191 |
| 188 base::WeakPtrFactory<Service> weak_ptr_factory_; | 192 base::WeakPtrFactory<Service> weak_ptr_factory_; |
| 189 DISALLOW_COPY_AND_ASSIGN(Service); | 193 DISALLOW_COPY_AND_ASSIGN(Service); |
| 190 }; | 194 }; |
| 191 | 195 |
| 192 } // namespace file_system_provider | 196 } // namespace file_system_provider |
| 193 } // namespace chromeos | 197 } // namespace chromeos |
| 194 | 198 |
| 195 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 199 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
| OLD | NEW |