Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/chromeos/cros/mount_library.h

Issue 8049002: Don't show hidden devices in UI (exept from imageburner). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'mock library update' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CHROMEOS_CROS_MOUNT_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const std::string& file_path, 80 const std::string& file_path,
81 const std::string& device_label, 81 const std::string& device_label,
82 const std::string& drive_label, 82 const std::string& drive_label,
83 const std::string& parent_path, 83 const std::string& parent_path,
84 const std::string& system_path_prefix, 84 const std::string& system_path_prefix,
85 DeviceType device_type, 85 DeviceType device_type,
86 uint64 total_size, 86 uint64 total_size,
87 bool is_parent, 87 bool is_parent,
88 bool is_read_only, 88 bool is_read_only,
89 bool has_media, 89 bool has_media,
90 bool on_boot_device); 90 bool on_boot_device,
91 bool is_hidden);
91 ~Disk(); 92 ~Disk();
92 93
93 // The path of the device, used by devicekit-disks. 94 // The path of the device, used by devicekit-disks.
94 const std::string& device_path() const { return device_path_; } 95 const std::string& device_path() const { return device_path_; }
95 // The path to the mount point of this device. Will be empty if not mounted. 96 // The path to the mount point of this device. Will be empty if not mounted.
96 const std::string& mount_path() const { return mount_path_; } 97 const std::string& mount_path() const { return mount_path_; }
97 // The path of the device according to the udev system. 98 // The path of the device according to the udev system.
98 const std::string& system_path() const { return system_path_; } 99 const std::string& system_path() const { return system_path_; }
99 // The path of the device according to filesystem. 100 // The path of the device according to filesystem.
100 const std::string& file_path() const { return file_path_; } 101 const std::string& file_path() const { return file_path_; }
(...skipping 12 matching lines...) Expand all
113 // Total size of the device. 114 // Total size of the device.
114 uint64 total_size() const { return total_size_; } 115 uint64 total_size() const { return total_size_; }
115 // Is the device is a parent device (i.e. sdb rather than sdb1). 116 // Is the device is a parent device (i.e. sdb rather than sdb1).
116 bool is_parent() const { return is_parent_; } 117 bool is_parent() const { return is_parent_; }
117 // Is the device read only. 118 // Is the device read only.
118 bool is_read_only() const { return is_read_only_; } 119 bool is_read_only() const { return is_read_only_; }
119 // Does the device contains media. 120 // Does the device contains media.
120 bool has_media() const { return has_media_; } 121 bool has_media() const { return has_media_; }
121 // Is the device on the boot device. 122 // Is the device on the boot device.
122 bool on_boot_device() const { return on_boot_device_; } 123 bool on_boot_device() const { return on_boot_device_; }
124 // Shoud the device be shown in the UI, or automounted.
125 bool is_hidden() const { return is_hidden_; }
123 126
124 void set_mount_path(const char* mount_path) { mount_path_ = mount_path; } 127 void set_mount_path(const char* mount_path) { mount_path_ = mount_path; }
125 void clear_mount_path() { mount_path_.clear(); } 128 void clear_mount_path() { mount_path_.clear(); }
126 129
127 private: 130 private:
128 std::string device_path_; 131 std::string device_path_;
129 std::string mount_path_; 132 std::string mount_path_;
130 std::string system_path_; 133 std::string system_path_;
131 std::string file_path_; 134 std::string file_path_;
132 std::string device_label_; 135 std::string device_label_;
133 std::string drive_label_; 136 std::string drive_label_;
134 std::string parent_path_; 137 std::string parent_path_;
135 std::string system_path_prefix_; 138 std::string system_path_prefix_;
136 DeviceType device_type_; 139 DeviceType device_type_;
137 uint64 total_size_; 140 uint64 total_size_;
138 bool is_parent_; 141 bool is_parent_;
139 bool is_read_only_; 142 bool is_read_only_;
140 bool has_media_; 143 bool has_media_;
141 bool on_boot_device_; 144 bool on_boot_device_;
145 bool is_hidden_;
142 }; 146 };
143 typedef std::map<std::string, Disk*> DiskMap; 147 typedef std::map<std::string, Disk*> DiskMap;
144 typedef std::map<std::string, std::string> PathMap; 148 typedef std::map<std::string, std::string> PathMap;
145 149
146 struct MountPointInfo { 150 struct MountPointInfo {
147 std::string source_path; 151 std::string source_path;
148 std::string mount_path; 152 std::string mount_path;
149 MountType mount_type; 153 MountType mount_type;
150 MountCondition mount_condition; 154 MountCondition mount_condition;
151 155
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual void SetLibcrosProxy(MountLibcrosProxy* proxy) {} 220 virtual void SetLibcrosProxy(MountLibcrosProxy* proxy) {}
217 221
218 // Factory function, creates a new instance and returns ownership. 222 // Factory function, creates a new instance and returns ownership.
219 // For normal usage, access the singleton via CrosLibrary::Get(). 223 // For normal usage, access the singleton via CrosLibrary::Get().
220 static MountLibrary* GetImpl(bool stub); 224 static MountLibrary* GetImpl(bool stub);
221 }; 225 };
222 226
223 } // namespace chromeos 227 } // namespace chromeos
224 228
225 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ 229 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_mount_library.cc ('k') | chrome/browser/chromeos/cros/mount_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698