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

Unified Diff: chrome/browser/chromeos/cros/mount_library.h

Issue 7471024: Formatting feature initial commit for ChromeOS Tree (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added dependency on cros change Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/mount_library.h
diff --git a/chrome/browser/chromeos/cros/mount_library.h b/chrome/browser/chromeos/cros/mount_library.h
index b735d3d00f5fed6c659c866accb87642d363dc66..4575b6bbdb2f2c631a07e62b3f7af4b5de55a030 100644
--- a/chrome/browser/chromeos/cros/mount_library.h
+++ b/chrome/browser/chromeos/cros/mount_library.h
@@ -24,7 +24,9 @@ typedef enum MountLibraryEventType {
MOUNT_DISK_UNMOUNTED,
MOUNT_DEVICE_ADDED,
MOUNT_DEVICE_REMOVED,
- MOUNT_DEVICE_SCANNED
+ MOUNT_DEVICE_SCANNED,
+ MOUNT_FORMATTING_STARTED,
+ MOUNT_FORMATTING_FINISHED
} MountLibraryEventType;
// This class handles the interaction with the ChromeOS mount library APIs.
@@ -96,6 +98,7 @@ class MountLibrary {
bool on_boot_device_;
};
typedef std::map<std::string, Disk*> DiskMap;
+ typedef std::map<std::string, std::string> PathMap;
typedef void(*UnmountDeviceRecursiveCallbackType)(void*, bool);
@@ -106,22 +109,25 @@ class MountLibrary {
virtual void DiskChanged(MountLibraryEventType event,
const Disk* disk) = 0;
virtual void DeviceChanged(MountLibraryEventType event,
- const std::string& device_path ) = 0;
+ const std::string& device_path) = 0;
};
virtual ~MountLibrary() {}
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
virtual const DiskMap& disks() const = 0;
-
virtual void RequestMountInfoRefresh() = 0;
+ // Mounts device given its device path
virtual void MountPath(const char* device_path) = 0;
+ // Unmounts device given is device path
virtual void UnmountPath(const char* device_path) = 0;
-
+ // Formats device given its file path, eg. /dev/*
tbarzic 2011/07/25 20:43:04 dot at the end of the comment.
sidor 2011/07/25 21:40:07 Done.
+ virtual void FormatUnmountedDevice(const char* file_path) = 0;
+ // Formats Device given its mount path
tbarzic 2011/07/25 20:43:04 I don't see that you are using FormatUnmountDevice
sidor 2011/07/25 21:40:07 Hmm.. I will use it really soon. I would really ra
+ virtual void FormatMountedDevice(const char* device_mount_path) = 0;
tbarzic 2011/07/25 20:43:04 I'd rename device_mount_path to mount_path.
sidor 2011/07/25 21:40:07 Done.
// Unmounts device_poath and all of its known children.
virtual void UnmountDeviceRecursive(const char* device_path,
UnmountDeviceRecursiveCallbackType callback, void* user_data) = 0;
-
// Factory function, creates a new instance and returns ownership.
// For normal usage, access the singleton via CrosLibrary::Get().
static MountLibrary* GetImpl(bool stub);

Powered by Google App Engine
This is Rietveld 408576698