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

Unified Diff: chromeos/dbus/cros_disks_client.h

Issue 11365142: Small refactoring in DiskMountManager (event reporting; format method). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: few lint nits Created 8 years, 1 month 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
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/dbus/cros_disks_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cros_disks_client.h
diff --git a/chromeos/dbus/cros_disks_client.h b/chromeos/dbus/cros_disks_client.h
index 62cc67b9205f714643e04319e27ff016654d5d81..4f08a25fc4531359b2534bc34280fd44de043d28 100644
--- a/chromeos/dbus/cros_disks_client.h
+++ b/chromeos/dbus/cros_disks_client.h
@@ -18,8 +18,10 @@ class Bus;
class Response;
}
-// TODO(tbarzic): We should probably move these enums inside CrosDisksClient,
-// to be clearer where they come from.
+// TODO(tbarzic): We should move these enums inside CrosDisksClient,
+// to be clearer where they come from. Also, most of these are partially or
+// completely duplicated in third_party/dbus/service_constants.h. We should
+// probably use enums from service_contstants directly.
namespace chromeos {
// Enum describing types of mount used by cros-disks.
@@ -46,6 +48,17 @@ enum MountError {
MOUNT_ERROR_NONE = 0,
MOUNT_ERROR_UNKNOWN = 1,
MOUNT_ERROR_INTERNAL = 2,
+ MOUNT_ERROR_INVALID_ARGUMENT = 3,
+ MOUNT_ERROR_INVALID_PATH = 4,
+ MOUNT_ERROR_PATH_ALREADY_MOUNTED = 5,
+ MOUNT_ERROR_PATH_NOT_MOUNTED = 6,
+ MOUNT_ERROR_DIRECTORY_CREATION_FAILED = 7,
+ MOUNT_ERROR_INVALID_MOUNT_OPTIONS = 8,
+ MOUNT_ERROR_INVALID_UNMOUNT_OPTIONS = 9,
+ MOUNT_ERROR_INSUFFICIENT_PERMISSIONS = 10,
+ MOUNT_ERROR_MOUNT_PROGRAM_NOT_FOUND = 11,
+ MOUNT_ERROR_MOUNT_PROGRAM_FAILED = 12,
+ MOUNT_ERROR_INVALID_DEVICE_PATH = 100,
MOUNT_ERROR_UNKNOWN_FILESYSTEM = 101,
MOUNT_ERROR_UNSUPPORTED_FILESYSTEM = 102,
MOUNT_ERROR_INVALID_ARCHIVE = 201,
@@ -55,15 +68,28 @@ enum MountError {
// consider doing explicit translation from cros-disks error_types.
};
+// Format error reported by cros-disks.
+enum FormatError {
+ FORMAT_ERROR_NONE,
+ FORMAT_ERROR_UNKNOWN,
+ FORMAT_ERROR_INTERNAL,
+ FORMAT_ERROR_INVALID_DEVICE_PATH,
+ FORMAT_ERROR_DEVICE_BEING_FORMATTED,
+ FORMAT_ERROR_UNSUPPORTED_FILESYSTEM,
+ FORMAT_ERROR_FORMAT_PROGRAM_NOT_FOUND,
+ FORMAT_ERROR_FORMAT_PROGRAM_FAILED,
+ FORMAT_ERROR_DEVICE_NOT_ALLOWED,
+};
+
// Event type each corresponding to a signal sent from cros-disks.
enum MountEventType {
- DISK_ADDED,
- DISK_REMOVED,
- DISK_CHANGED,
- DEVICE_ADDED,
- DEVICE_REMOVED,
- DEVICE_SCANNED,
- FORMATTING_FINISHED,
+ CROS_DISKS_DISK_ADDED,
+ CROS_DISKS_DISK_REMOVED,
+ CROS_DISKS_DISK_CHANGED,
+ CROS_DISKS_DEVICE_ADDED,
+ CROS_DISKS_DEVICE_REMOVED,
+ CROS_DISKS_DEVICE_SCANNED,
+ CROS_DISKS_FORMATTING_FINISHED,
};
// Additional unmount flags to be added to unmount request.
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/dbus/cros_disks_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698