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 CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 // Gets the list of disks found. | 194 // Gets the list of disks found. |
195 virtual const DiskMap& disks() const = 0; | 195 virtual const DiskMap& disks() const = 0; |
196 | 196 |
197 // Gets the list of mount points. | 197 // Gets the list of mount points. |
198 virtual const MountPointMap& mount_points() const = 0; | 198 virtual const MountPointMap& mount_points() const = 0; |
199 | 199 |
200 // Requests refreshing all the information about mounted disks. | 200 // Requests refreshing all the information about mounted disks. |
201 virtual void RequestMountInfoRefresh() = 0; | 201 virtual void RequestMountInfoRefresh() = 0; |
202 | 202 |
203 // Mounts a device. | 203 // Mounts a device. |
204 virtual void MountPath(const std::string& source_path, MountType type) = 0; | 204 virtual void MountPath(const std::string& source_path, |
205 const std::string& source_name, | |
Ben Chan
2012/04/17 20:57:53
calling it |source_name| is misleading here. it sh
| |
206 MountType type) = 0; | |
205 | 207 |
206 // Unmounts a mounted disk. | 208 // Unmounts a mounted disk. |
207 virtual void UnmountPath(const std::string& mount_path) = 0; | 209 virtual void UnmountPath(const std::string& mount_path) = 0; |
208 | 210 |
209 // Retrieves total and remaining available size on |mount_path|. | 211 // Retrieves total and remaining available size on |mount_path|. |
210 virtual void GetSizeStatsOnFileThread(const std::string& mount_path, | 212 virtual void GetSizeStatsOnFileThread(const std::string& mount_path, |
211 size_t* total_size_kb, | 213 size_t* total_size_kb, |
212 size_t* remaining_size_kb) = 0; | 214 size_t* remaining_size_kb) = 0; |
213 // Formats device given its file path. | 215 // Formats device given its file path. |
214 // Example: file_path: /dev/sdb1 | 216 // Example: file_path: /dev/sdb1 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 | 252 |
251 // Returns a pointer to the global DiskMountManager instance. | 253 // Returns a pointer to the global DiskMountManager instance. |
252 // Initialize() should already have been called. | 254 // Initialize() should already have been called. |
253 static DiskMountManager* GetInstance(); | 255 static DiskMountManager* GetInstance(); |
254 }; | 256 }; |
255 | 257 |
256 } // namespace disks | 258 } // namespace disks |
257 } // namespace chromeos | 259 } // namespace chromeos |
258 | 260 |
259 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 261 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
OLD | NEW |