Chromium Code Reviews| 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_SYSTEM_MONITOR_DISK_INFO_MAC_H_ | 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_ |
| 6 #define CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_ | 6 #define CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_ |
| 7 | 7 |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "chrome/browser/system_monitor/media_storage_util.h" | 11 #include "chrome/browser/system_monitor/media_storage_util.h" |
| 12 | 12 |
| 13 namespace chrome { | 13 namespace chrome { |
| 14 | 14 |
| 15 // This class stores information about a particular disk. | 15 // This class stores information about a particular disk. |
| 16 class DiskInfoMac { | 16 class DiskInfoMac { |
| 17 public: | 17 public: |
| 18 DiskInfoMac(); | 18 DiskInfoMac(); |
| 19 ~DiskInfoMac(); | 19 ~DiskInfoMac(); |
| 20 | 20 |
| 21 // Creates a disk info object based on information from the given | 21 // Creates a disk info object based on information from the given |
| 22 // dictionary. This function must be called on the file thread. | 22 // dictionary. This function must be called on the file thread. |
| 23 static DiskInfoMac BuildDiskInfoOnFileThread(CFDictionaryRef dict); | 23 static DiskInfoMac BuildDiskInfoOnFileThread(CFDictionaryRef dict); |
| 24 | 24 |
| 25 // Construct a disk info object from info from an ImageCature device. | |
| 26 static DiskInfoMac BuildDiskInfoFromICDevice(std::string device_id, | |
|
sail
2012/12/10 19:38:48
where is this used?
Greg Billock
2012/12/10 19:47:37
Nowhere yet. This is part 1 of about 4.
On 2012/1
sail
2012/12/10 19:50:26
Ahh makes sense! Mayb add "Part 1 of 4" to the CL
| |
| 27 string16 device_name, | |
| 28 FilePath mount_point); | |
| 29 | |
| 25 const std::string& bsd_name() const { return bsd_name_; } | 30 const std::string& bsd_name() const { return bsd_name_; } |
| 26 const std::string& device_id() const { return device_id_; } | 31 const std::string& device_id() const { return device_id_; } |
| 27 const std::string& model_name() const { return model_name_; } | 32 const std::string& model_name() const { return model_name_; } |
| 28 const string16& device_name() const { return device_name_; } | 33 const string16& device_name() const { return device_name_; } |
| 29 const FilePath& mount_point() const { return mount_point_; } | 34 const FilePath& mount_point() const { return mount_point_; } |
| 30 MediaStorageUtil::Type type() const { return type_; } | 35 MediaStorageUtil::Type type() const { return type_; } |
| 31 uint64 total_size_in_bytes() const { return total_size_in_bytes_; } | 36 uint64 total_size_in_bytes() const { return total_size_in_bytes_; } |
| 32 | 37 |
| 33 private: | 38 private: |
| 34 std::string bsd_name_; | 39 std::string bsd_name_; |
| 35 std::string device_id_; | 40 std::string device_id_; |
| 36 std::string model_name_; | 41 std::string model_name_; |
| 37 string16 device_name_; | 42 string16 device_name_; |
| 38 FilePath mount_point_; | 43 FilePath mount_point_; |
| 39 MediaStorageUtil::Type type_; | 44 MediaStorageUtil::Type type_; |
| 40 uint64 total_size_in_bytes_; | 45 uint64 total_size_in_bytes_; |
| 41 }; | 46 }; |
| 42 | 47 |
| 43 } // namespace chrome | 48 } // namespace chrome |
| 44 | 49 |
| 45 #endif // CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_ | 50 #endif // CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_ |
| OLD | NEW |