| Index: chrome/browser/storage_monitor/storage_monitor.cc
|
| diff --git a/chrome/browser/storage_monitor/storage_monitor.cc b/chrome/browser/storage_monitor/storage_monitor.cc
|
| index 682264223c40b147f4446a65e51ef9b9b042da53..561fe0a70f1778d8363ee4aabae946b695bdc4d2 100644
|
| --- a/chrome/browser/storage_monitor/storage_monitor.cc
|
| +++ b/chrome/browser/storage_monitor/storage_monitor.cc
|
| @@ -49,11 +49,11 @@ StorageMonitor* StorageMonitor::GetInstance() {
|
| return g_storage_monitor;
|
| }
|
|
|
| -std::vector<StorageInfo> StorageMonitor::GetAttachedStorage() const {
|
| +std::vector<StorageInfo> StorageMonitor::GetAllAvailableStorages() const {
|
| std::vector<StorageInfo> results;
|
|
|
| base::AutoLock lock(storage_lock_);
|
| - for (RemovableStorageMap::const_iterator it = storage_map_.begin();
|
| + for (AllAvailableStorageMap::const_iterator it = storage_map_.begin();
|
| it != storage_map_.end();
|
| ++it) {
|
| results.push_back(it->second);
|
| @@ -152,15 +152,16 @@ void StorageMonitor::ProcessAttach(const StorageInfo& info) {
|
|
|
| DVLOG(1) << "RemovableStorageAttached with name " << UTF16ToUTF8(info.name())
|
| << " and id " << info.device_id();
|
| - observer_list_->Notify(
|
| - &RemovableStorageObserver::OnRemovableStorageAttached, info);
|
| + if (StorageInfo::IsRemovableDevice(info.device_id()))
|
| + observer_list_->Notify(
|
| + &RemovableStorageObserver::OnRemovableStorageAttached, info);
|
| }
|
|
|
| void StorageMonitor::ProcessDetach(const std::string& id) {
|
| StorageInfo info;
|
| {
|
| base::AutoLock lock(storage_lock_);
|
| - RemovableStorageMap::iterator it = storage_map_.find(id);
|
| + AllAvailableStorageMap::iterator it = storage_map_.find(id);
|
| if (it == storage_map_.end())
|
| return;
|
| info = it->second;
|
|
|