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

Unified Diff: chrome/browser/storage_monitor/test_volume_mount_watcher_win.cc

Issue 16056002: Cleanup Various bits of Windows StorageMonitor classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/storage_monitor/test_volume_mount_watcher_win.cc
===================================================================
--- chrome/browser/storage_monitor/test_volume_mount_watcher_win.cc (revision 203027)
+++ chrome/browser/storage_monitor/test_volume_mount_watcher_win.cc (working copy)
@@ -58,9 +58,9 @@
"\\\\?\\Volume{00000000-0000-0000-0000-000000000000}\\";
unique_id[11] = device_path.value()[0];
std::string device_id = StorageInfo::MakeDeviceId(type, unique_id);
- string16 storage_label = path.Append(L" Drive").LossyDisplayName();
- *info = StorageInfo(device_id, string16(), path.value(), storage_label,
- string16(), string16(), 1000000);
+ base::string16 storage_label = path.Append(L" Drive").LossyDisplayName();
+ *info = StorageInfo(device_id, base::string16(), path.value(), storage_label,
+ base::string16(), base::string16(), 1000000);
return true;
}
@@ -78,10 +78,11 @@
void TestVolumeMountWatcherWin::AddDeviceForTesting(
const base::FilePath& device_path,
const std::string& device_id,
- const string16& device_name,
+ const base::string16& device_name,
uint64 total_size_in_bytes) {
StorageInfo info(device_id, device_name, device_path.value(),
- string16(), string16(), string16(), total_size_in_bytes);
+ base::string16(), base::string16(), base::string16(),
+ total_size_in_bytes);
HandleDeviceAttachEventOnUIThread(device_path, info);
}
@@ -110,9 +111,10 @@
device_check_complete_event_->Signal();
}
+// static
bool TestVolumeMountWatcherWin::GetDeviceRemovable(
const base::FilePath& device_path,
- bool* removable) const {
+ bool* removable) {
StorageInfo info;
bool success = GetMassStorageDeviceDetails(device_path, &info);
*removable = StorageInfo::IsRemovableDevice(info.device_id());
@@ -128,7 +130,6 @@
TestVolumeMountWatcherWin::GetAttachedDevicesCallback() const {
if (attached_devices_fake_)
return base::Bind(&FakeGetAttachedDevices);
-
return base::Bind(&FakeGetSingleAttachedDevice);
}

Powered by Google App Engine
This is Rietveld 408576698