Index: chrome/browser/chromeos/file_manager/volume_manager.h |
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.h b/chrome/browser/chromeos/file_manager/volume_manager.h |
index efaf20f2857767687367378c6ce057a10309c04c..6e3f74cab75962ac5feeb761ab26df7ff03fd457 100644 |
--- a/chrome/browser/chromeos/file_manager/volume_manager.h |
+++ b/chrome/browser/chromeos/file_manager/volume_manager.h |
@@ -66,6 +66,9 @@ enum MountContext { |
MOUNT_CONTEXT_UNKNOWN |
}; |
+// Source of a volume's data. |
+enum Source { SOURCE_FILE, SOURCE_DEVICE, SOURCE_NETWORK, SOURCE_SYSTEM }; |
+ |
// Represents a volume (mount point) in the volume manager. Validity of the data |
// is guaranteed by the weak pointer. Simply saying, the weak pointer should be |
// valid as long as the volume is mounted. |
@@ -97,6 +100,7 @@ class Volume : public base::SupportsWeakPtr<Volume> { |
const std::string& volume_id() const { return volume_id_; } |
const std::string& file_system_id() const { return file_system_id_; } |
const std::string& extension_id() const { return extension_id_; } |
+ const Source source() const { return source_; } |
hirono
2015/05/15 08:27:45
nit for return type: const Source -> Source ?
mtomasz
2015/05/15 09:32:37
Done.
|
VolumeType type() const { return type_; } |
chromeos::DeviceType device_type() const { return device_type_; } |
const base::FilePath& source_path() const { return source_path_; } |
@@ -112,6 +116,7 @@ class Volume : public base::SupportsWeakPtr<Volume> { |
bool is_parent() const { return is_parent_; } |
bool is_read_only() const { return is_read_only_; } |
bool has_media() const { return has_media_; } |
+ bool configurable() const { return configurable_; } |
private: |
Volume(); |
@@ -127,6 +132,9 @@ class Volume : public base::SupportsWeakPtr<Volume> { |
// to an empty string. |
std::string extension_id_; |
+ // The source of the volume's data. |
+ Source source_; |
+ |
// The type of mounted volume. |
VolumeType type_; |
@@ -170,6 +178,9 @@ class Volume : public base::SupportsWeakPtr<Volume> { |
// True if the volume contains media. |
bool has_media_; |
+ // True if the volume is configurable. |
+ bool configurable_; |
+ |
DISALLOW_COPY_AND_ASSIGN(Volume); |
}; |
@@ -228,6 +239,9 @@ class VolumeManager : public KeyedService, |
chromeos::DeviceType device_type, |
bool read_only); |
+ // For testing purpose, adds the volume info to the volume manager. |
+ void AddVolumeForTesting(linked_ptr<Volume> volume); |
hirono
2015/05/15 08:27:45
nit: const linked_ptr<Volume>& volume ?
mtomasz
2015/05/15 09:32:37
I was considering it, but it seemed that linked_pt
|
+ |
// drive::DriveIntegrationServiceObserver overrides. |
void OnFileSystemMounted() override; |
void OnFileSystemBeingUnmounted() override; |