Change filesystem passed to Format to be an enum

This is also done in preparation of recording the filesystem selected
when formatting into a UMA.

Bug: 632988
Change-Id: I91db06307638403a9907525e09558344e1b916c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707629
Commit-Queue: Austin Tankiang <[email protected]>
Reviewed-by: Noel Gordon <[email protected]>
Reviewed-by: Anand Mistry <[email protected]>
Cr-Commit-Position: refs/heads/master@{#678987}
diff --git a/chromeos/disks/disk_mount_manager_unittest.cc b/chromeos/disks/disk_mount_manager_unittest.cc
index a34b8b4..2b141dd 100644
--- a/chromeos/disks/disk_mount_manager_unittest.cc
+++ b/chromeos/disks/disk_mount_manager_unittest.cc
@@ -37,8 +37,11 @@
 const char kReadOnlyDeviceSourcePath[] = "/device/read_only_source_path";
 const char kFileSystemType1[] = "ntfs";
 const char kFileSystemType2[] = "exfat";
-const char kFormatFileSystemType1[] = "vfat";
-const char kFormatFileSystemType2[] = "exfat";
+const FormatFileSystemType kFormatFileSystemType1 = FormatFileSystemType::kVfat;
+const FormatFileSystemType kFormatFileSystemType2 =
+    FormatFileSystemType::kExfat;
+const char kFormatFileSystemType1Str[] = "vfat";
+const char kFormatFileSystemType2Str[] = "exfat";
 const char kFormatLabel1[] = "UNTITLED";
 const char kFormatLabel2[] = "TESTUSB";
 
@@ -694,7 +697,7 @@
   EXPECT_EQ(1, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel1, fake_cros_disks_client_->last_format_label());
 
@@ -752,7 +755,7 @@
   EXPECT_EQ(1, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel1, fake_cros_disks_client_->last_format_label());
 
@@ -791,7 +794,7 @@
   EXPECT_EQ(1, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel1, fake_cros_disks_client_->last_format_label());
 
@@ -843,7 +846,7 @@
   EXPECT_EQ(1, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel1, fake_cros_disks_client_->last_format_label());
 
@@ -867,7 +870,7 @@
             observer_->GetFormatEvent(2));
 
   // Disk should have new values for file system type and device label name
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             disks.find(kDevice1SourcePath)->second->file_system_type());
   EXPECT_EQ(kFormatLabel1,
             disks.find(kDevice1SourcePath)->second->device_label());
@@ -894,7 +897,7 @@
   EXPECT_EQ(1, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType1,
+  EXPECT_EQ(kFormatFileSystemType1Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel1, fake_cros_disks_client_->last_format_label());
 
@@ -927,7 +930,7 @@
   EXPECT_EQ(2, fake_cros_disks_client_->format_call_count());
   EXPECT_EQ(kDevice1SourcePath,
             fake_cros_disks_client_->last_format_device_path());
-  EXPECT_EQ(kFormatFileSystemType2,
+  EXPECT_EQ(kFormatFileSystemType2Str,
             fake_cros_disks_client_->last_format_filesystem());
   EXPECT_EQ(kFormatLabel2, fake_cros_disks_client_->last_format_label());