summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_cros_disks_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/dbus/fake_cros_disks_client.cc')
-rw-r--r--chromeos/dbus/fake_cros_disks_client.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/chromeos/dbus/fake_cros_disks_client.cc b/chromeos/dbus/fake_cros_disks_client.cc
index 2578077..8e96bf2 100644
--- a/chromeos/dbus/fake_cros_disks_client.cc
+++ b/chromeos/dbus/fake_cros_disks_client.cc
@@ -75,13 +75,21 @@ void FakeCrosDisksClient::GetDeviceProperties(
const base::Closure& error_callback) {
}
-void FakeCrosDisksClient::SetUpConnections(
- const MountEventHandler& mount_event_handler,
- const MountCompletedHandler& mount_completed_handler) {
+void FakeCrosDisksClient::SetMountEventHandler(
+ const MountEventHandler& mount_event_handler) {
mount_event_handler_ = mount_event_handler;
+}
+
+void FakeCrosDisksClient::SetMountCompletedHandler(
+ const MountCompletedHandler& mount_completed_handler) {
mount_completed_handler_ = mount_completed_handler;
}
+void FakeCrosDisksClient::SetFormatCompletedHandler(
+ const FormatCompletedHandler& format_completed_handler) {
+ format_completed_handler_ = format_completed_handler;
+}
+
bool FakeCrosDisksClient::SendMountEvent(MountEventType event,
const std::string& path) {
if (mount_event_handler_.is_null())
@@ -101,4 +109,13 @@ bool FakeCrosDisksClient::SendMountCompletedEvent(
return true;
}
+bool FakeCrosDisksClient::SendFormatCompletedEvent(
+ FormatError error_code,
+ const std::string& device_path) {
+ if (format_completed_handler_.is_null())
+ return false;
+ format_completed_handler_.Run(error_code, device_path);
+ return true;
+}
+
} // namespace chromeos