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

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: merged ToT Created 7 years, 6 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 8cd39983e8f326c64f862d02c65fa77f0a58fb63..13ed0ff26ab3c0514bc17eb6d4fa4a2edba4bb16 100644
--- a/chrome/browser/storage_monitor/volume_mount_watcher_win.cc
+++ b/chrome/browser/storage_monitor/volume_mount_watcher_win.cc
@@ -428,10 +428,10 @@ bool VolumeMountWatcherWin::GetDeviceInfo(const base::FilePath& device_path,
DCHECK(info);
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())
@@ -486,7 +486,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);
@@ -503,7 +503,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;
@@ -522,7 +522,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