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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 // Finds the device that contains |path| and populates |device_info|. | 46 // Finds the device that contains |path| and populates |device_info|. |
47 // Returns false if unable to find the device. | 47 // Returns false if unable to find the device. |
48 virtual bool GetStorageInfoForPath( | 48 virtual bool GetStorageInfoForPath( |
49 const base::FilePath& path, | 49 const base::FilePath& path, |
50 chrome::StorageInfo* device_info) const OVERRIDE; | 50 chrome::StorageInfo* device_info) const OVERRIDE; |
51 | 51 |
52 // Returns the storage size of the device present at |location|. If the | 52 // Returns the storage size of the device present at |location|. If the |
53 // device information is unavailable, returns zero. | 53 // device information is unavailable, returns zero. |
54 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE; | 54 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE; |
55 | 55 |
56 virtual void EjectDevice( | |
tbarzic
2013/03/13 18:57:04
can you add a method comment.
| |
57 const std::string& device_id, | |
58 base::Callback<void(EjectStatus)> callback) OVERRIDE; | |
59 | |
56 private: | 60 private: |
57 friend class base::RefCountedThreadSafe<StorageMonitorCros>; | 61 friend class base::RefCountedThreadSafe<StorageMonitorCros>; |
58 | 62 |
59 // Mapping of mount path to removable mass storage info. | 63 // Mapping of mount path to removable mass storage info. |
60 typedef std::map<std::string, chrome::StorageInfo> MountMap; | 64 typedef std::map<std::string, chrome::StorageInfo> MountMap; |
61 | 65 |
62 // Private to avoid code deleting the object. | 66 // Private to avoid code deleting the object. |
63 virtual ~StorageMonitorCros(); | 67 virtual ~StorageMonitorCros(); |
64 | 68 |
65 // Checks existing mount points map for media devices. For each mount point, | 69 // Checks existing mount points map for media devices. For each mount point, |
(...skipping 15 matching lines...) Expand all Loading... | |
81 // Mapping of relevant mount points and their corresponding mount devices. | 85 // Mapping of relevant mount points and their corresponding mount devices. |
82 // Only accessed on the UI thread. | 86 // Only accessed on the UI thread. |
83 MountMap mount_map_; | 87 MountMap mount_map_; |
84 | 88 |
85 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); | 89 DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); |
86 }; | 90 }; |
87 | 91 |
88 } // namespace chromeos | 92 } // namespace chromeos |
89 | 93 |
90 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ | 94 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_CHROMEOS_H_ |
OLD | NEW |