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

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

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address jyasskin's comments\ 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/volume_mount_watcher_win.cc
diff --git a/chrome/browser/storage_monitor/volume_mount_watcher_win.cc b/chrome/browser/storage_monitor/volume_mount_watcher_win.cc
index ec1c7d7fba682cd1859319b150c5826a4e2bf4c8..511044e58d15abf3713c86fe7232d7844243be04 100644
--- a/chrome/browser/storage_monitor/volume_mount_watcher_win.cc
+++ b/chrome/browser/storage_monitor/volume_mount_watcher_win.cc
@@ -436,10 +436,10 @@ bool VolumeMountWatcherWin::GetDeviceInfo(const base::FilePath& device_path,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
base::FilePath path(device_path);
MountPointDeviceMetadataMap::const_iterator iter =
- device_metadata_.find(path.value());
+ device_metadata_.find(path);
while (iter == device_metadata_.end() && path.DirName() != path) {
path = path.DirName();
- iter = device_metadata_.find(path.value());
+ iter = device_metadata_.find(path);
}
if (iter == device_metadata_.end())
@@ -496,7 +496,7 @@ void VolumeMountWatcherWin::HandleDeviceAttachEventOnUIThread(
const StorageInfo& info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- device_metadata_[device_path.value()] = info;
+ device_metadata_[device_path] = info;
DeviceCheckComplete(device_path);
@@ -513,7 +513,7 @@ void VolumeMountWatcherWin::HandleDeviceDetachEventOnUIThread(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
MountPointDeviceMetadataMap::const_iterator device_info =
- device_metadata_.find(device_location);
+ device_metadata_.find(base::FilePath(device_location));
// If the device isn't type removable (like a CD), it won't be there.
if (device_info == device_metadata_.end())
return;
@@ -533,7 +533,7 @@ void VolumeMountWatcherWin::EjectDevice(
callback.Run(StorageMonitor::EJECT_FAILURE);
return;
}
- if (device_metadata_.erase(device.value()) == 0) {
+ if (device_metadata_.erase(device) == 0) {
callback.Run(StorageMonitor::EJECT_FAILURE);
return;
}

Powered by Google App Engine
This is Rietveld 408576698