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 // chromeos::StorageMonitorCros listens for mount point changes and notifies | 5 // chromeos::StorageMonitorCros listens for mount point changes and notifies |
6 // listeners about the addition and deletion of media devices. | 6 // listeners about the addition and deletion of media devices. |
7 | 7 |
8 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ | 8 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ |
9 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ | 9 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual void OnFormatEvent(disks::DiskMountManager::FormatEvent event, | 50 virtual void OnFormatEvent(disks::DiskMountManager::FormatEvent event, |
51 FormatError error_code, | 51 FormatError error_code, |
52 const std::string& device_path) OVERRIDE; | 52 const std::string& device_path) OVERRIDE; |
53 | 53 |
54 // Finds the device that contains |path| and populates |device_info|. | 54 // Finds the device that contains |path| and populates |device_info|. |
55 // Returns false if unable to find the device. | 55 // Returns false if unable to find the device. |
56 virtual bool GetStorageInfoForPath( | 56 virtual bool GetStorageInfoForPath( |
57 const base::FilePath& path, | 57 const base::FilePath& path, |
58 chrome::StorageInfo* device_info) const OVERRIDE; | 58 chrome::StorageInfo* device_info) const OVERRIDE; |
59 | 59 |
60 // Returns the storage size of the device present at |location|. If the | |
61 // device information is unavailable, returns zero. | |
62 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE; | |
63 | |
64 virtual void EjectDevice( | 60 virtual void EjectDevice( |
65 const std::string& device_id, | 61 const std::string& device_id, |
66 base::Callback<void(EjectStatus)> callback) OVERRIDE; | 62 base::Callback<void(EjectStatus)> callback) OVERRIDE; |
67 | 63 |
68 private: | 64 private: |
69 friend class base::RefCountedThreadSafe<StorageMonitorCros>; | 65 friend class base::RefCountedThreadSafe<StorageMonitorCros>; |
70 | 66 |
71 // Mapping of mount path to removable mass storage info. | 67 // Mapping of mount path to removable mass storage info. |
72 typedef std::map<std::string, chrome::StorageInfo> MountMap; | 68 typedef std::map<std::string, chrome::StorageInfo> MountMap; |
73 | 69 |
(...skipping 22 matching lines...) Expand all Loading... |
96 | 92 |
97 scoped_ptr<chrome::MediaTransferProtocolDeviceObserverLinux> | 93 scoped_ptr<chrome::MediaTransferProtocolDeviceObserverLinux> |
98 media_transfer_protocol_device_observer_; | 94 media_transfer_protocol_device_observer_; |
99 | 95 |
100 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); | 96 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); |
101 }; | 97 }; |
102 | 98 |
103 } // namespace chromeos | 99 } // namespace chromeos |
104 | 100 |
105 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ | 101 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ |
OLD | NEW |