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 CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 5 #ifndef CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Is the device on the removable device. | 141 // Is the device on the removable device. |
142 bool on_removable_device() const { return on_removable_device_; } | 142 bool on_removable_device() const { return on_removable_device_; } |
143 | 143 |
144 // Shoud the device be shown in the UI, or automounted. | 144 // Shoud the device be shown in the UI, or automounted. |
145 bool is_hidden() const { return is_hidden_; } | 145 bool is_hidden() const { return is_hidden_; } |
146 | 146 |
147 void set_mount_path(const std::string& mount_path) { | 147 void set_mount_path(const std::string& mount_path) { |
148 mount_path_ = mount_path; | 148 mount_path_ = mount_path; |
149 } | 149 } |
150 | 150 |
| 151 void set_read_only(bool is_read_only) { is_read_only_ = is_read_only; } |
| 152 |
151 void clear_mount_path() { mount_path_.clear(); } | 153 void clear_mount_path() { mount_path_.clear(); } |
152 | 154 |
153 private: | 155 private: |
154 std::string device_path_; | 156 std::string device_path_; |
155 std::string mount_path_; | 157 std::string mount_path_; |
156 std::string system_path_; | 158 std::string system_path_; |
157 std::string file_path_; | 159 std::string file_path_; |
158 std::string device_label_; | 160 std::string device_label_; |
159 std::string drive_label_; | 161 std::string drive_label_; |
160 std::string vendor_id_; | 162 std::string vendor_id_; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 314 |
313 // Returns a pointer to the global DiskMountManager instance. | 315 // Returns a pointer to the global DiskMountManager instance. |
314 // Initialize() should already have been called. | 316 // Initialize() should already have been called. |
315 static DiskMountManager* GetInstance(); | 317 static DiskMountManager* GetInstance(); |
316 }; | 318 }; |
317 | 319 |
318 } // namespace disks | 320 } // namespace disks |
319 } // namespace chromeos | 321 } // namespace chromeos |
320 | 322 |
321 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 323 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
OLD | NEW |