| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h" | 5 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <dbt.h> | 9 #include <dbt.h> |
| 10 #include <fileapi.h> | 10 #include <fileapi.h> |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 } | 527 } |
| 528 if (device_metadata_.erase(device.value()) == 0) { | 528 if (device_metadata_.erase(device.value()) == 0) { |
| 529 callback.Run(StorageMonitor::EJECT_FAILURE); | 529 callback.Run(StorageMonitor::EJECT_FAILURE); |
| 530 return; | 530 return; |
| 531 } | 531 } |
| 532 | 532 |
| 533 task_runner_->PostTask(FROM_HERE, | 533 task_runner_->PostTask(FROM_HERE, |
| 534 base::Bind(&EjectDeviceInThreadPool, device, callback, task_runner_, 0)); | 534 base::Bind(&EjectDeviceInThreadPool, device, callback, task_runner_, 0)); |
| 535 } | 535 } |
| 536 | 536 |
| 537 std::vector<StorageInfo> VolumeMountWatcherWin::GetAllVolumeStorages() const { |
| 538 std::vector<StorageInfo> results; |
| 539 MountPointDeviceMetadataMap::const_iterator it; |
| 540 for (it = device_metadata_.begin(); it != device_metadata_.end(); ++it) |
| 541 results.push_back(it->second); |
| 542 return results; |
| 543 } |
| 544 |
| 537 } // namespace chrome | 545 } // namespace chrome |
| OLD | NEW |