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 COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ |
6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ | 6 #define COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Looks inside |device_id| to determine if it is a mass storage device | 62 // Looks inside |device_id| to determine if it is a mass storage device |
63 // (type isn't MTP_OR_PTP). | 63 // (type isn't MTP_OR_PTP). |
64 static bool IsMassStorageDevice(const std::string& device_id); | 64 static bool IsMassStorageDevice(const std::string& device_id); |
65 | 65 |
66 static bool IsITunesDevice(const std::string& device_id); | 66 static bool IsITunesDevice(const std::string& device_id); |
67 | 67 |
68 static bool IsPicasaDevice(const std::string& device_id); | 68 static bool IsPicasaDevice(const std::string& device_id); |
69 | 69 |
70 static bool IsIPhotoDevice(const std::string& device_id); | 70 static bool IsIPhotoDevice(const std::string& device_id); |
71 | 71 |
| 72 static bool IsMTPDevice(const std::string& device_id); |
| 73 |
72 // Get the display name for the removable device represented by this | 74 // Get the display name for the removable device represented by this |
73 // StorageInfo. Include the size for removable devices if |with_size| is true. | 75 // StorageInfo. Include the size for removable devices if |with_size| is true. |
74 base::string16 GetDisplayName(bool with_size) const; | 76 base::string16 GetDisplayName(bool with_size) const; |
75 | 77 |
76 // Same as GetDisplayName(), but may be overridden by |override_display_name|. | 78 // Same as GetDisplayName(), but may be overridden by |override_display_name|. |
77 base::string16 GetDisplayNameWithOverride( | 79 base::string16 GetDisplayNameWithOverride( |
78 const base::string16& override_display_name, bool with_size) const; | 80 const base::string16& override_display_name, bool with_size) const; |
79 | 81 |
80 const std::string& device_id() const { return device_id_; } | 82 const std::string& device_id() const { return device_id_; } |
81 const base::FilePath::StringType& location() const { return location_; } | 83 const base::FilePath::StringType& location() const { return location_; } |
(...skipping 30 matching lines...) Expand all Loading... |
112 base::string16 model_name_; | 114 base::string16 model_name_; |
113 | 115 |
114 // Size of the removable device in bytes. | 116 // Size of the removable device in bytes. |
115 // Zero if not collected or unknown. | 117 // Zero if not collected or unknown. |
116 uint64 total_size_in_bytes_; | 118 uint64 total_size_in_bytes_; |
117 }; | 119 }; |
118 | 120 |
119 } // namespace storage_monitor | 121 } // namespace storage_monitor |
120 | 122 |
121 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ | 123 #endif // COMPONENTS_STORAGE_MONITOR_STORAGE_INFO_H_ |
OLD | NEW |